Re: [PATCHv7 10/10] drm: tegra: Add gr2d device
From: Terje Bergström
Date: Tue Mar 19 2013 - 12:37:30 EST
On 15.03.2013 14:13, Thierry Reding wrote:
> Also you now create a lookup table (or bitfield actually) as we
> discussed but you still pass around a function to check the lookup table
> against. What I originally intended was to not pass a function around at
> all but directly use the lookup table/bitfield. However I think we can
> leave this as-is for now and change it later if required.
Yeah, I think it's better if we leave this as is now. We should actually
have one table for host1x and one for 2D. The host1x one should be
shared between the drivers, but the table for client unit should be
local to the driver.
Let's take this up again when we have another driver.
>> +static int gr2d_probe(struct platform_device *pdev)
>> + struct device *dev = &pdev->dev;
>> + struct host1x_drm *host1x = host1x_get_drm_data(dev->parent);
>> + int err;
>> + struct gr2d *gr2d = NULL;
>> + struct host1x_syncpt **syncpts;
> I don't think there's a need for this temporary variable. You could just
> use gr2d->client.syncpts directly.
I actually ended up with pretty long lines when I tried this, so I hope
it's ok to leave as is.
>> + gr2d = devm_kzalloc(dev, sizeof(*gr2d), GFP_KERNEL);
>> + if (!gr2d)
>> + return -ENOMEM;
>> + syncpts = devm_kzalloc(dev, sizeof(*syncpts), GFP_KERNEL);
F.ex. this line would split two two lines.
Otherwise the changes should be now pretty much ok. You sent a bunch of
changes (thanks) that I merged to my tree. I'll just need to do some
testing and re-split the patches and send v8.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/