[PATCH 08/35] drm/<drivers>: Unified handling of unimplemented fb->create_handle
Daniel Vetter
daniel.vetter at ffwll.ch
Fri Jan 18 10:32:14 PST 2013
On Fri, Jan 18, 2013 at 4:00 PM, Thierry Reding
<thierry.reding at avionic-design.de> wrote:
> On Thu, Jan 10, 2013 at 09:47:49PM +0100, Daniel Vetter wrote:
> [...]
>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
>> index 8d665fa..a9abf49 100644
>> --- a/drivers/gpu/drm/drm_crtc.c
>> +++ b/drivers/gpu/drm/drm_crtc.c
>> @@ -2384,7 +2384,10 @@ int drm_mode_getfb(struct drm_device *dev,
>> r->depth = fb->depth;
>> r->bpp = fb->bits_per_pixel;
>> r->pitch = fb->pitches[0];
>> - fb->funcs->create_handle(fb, file_priv, &r->handle);
>> + if (fb->funcs->create_handle)
>> + ret = fb->funcs->create_handle(fb, file_priv, &r->handle);
>> + else
>> + ret = -ENODEV;
>
> Should this perhaps be -ENOSYS?
I tend to just randomly picked an errno which shouldn't ever show up
when using this ioctl on a driver which implements the callback. If
ENOSYS is the popular choice, I'll change it.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel
mailing list