mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
drm: use drm_driver_legacy_fb_format in drm_gem_fbdev_fb_create
Creating framebuffers for fbdev emulation should use the correct format code too, so switch drm_gem_fbdev_fb_create() over to use the new drm_driver_legacy_fb_format() function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-3-kraxel@redhat.com
This commit is contained in:
parent
059b5eb5d9
commit
184bef8924
@ -316,8 +316,8 @@ drm_gem_fbdev_fb_create(struct drm_device *dev,
|
||||
if (pitch_align)
|
||||
mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0],
|
||||
pitch_align);
|
||||
mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
|
||||
sizes->surface_depth);
|
||||
mode_cmd.pixel_format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
|
||||
sizes->surface_depth);
|
||||
if (obj->size < mode_cmd.pitches[0] * mode_cmd.height)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user