lkml.org 
[lkml]   [2023]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 5/8] drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()
Hi Geert,

On Thu, 24 Aug 2023 at 16:09, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> struct drm_client_dev *client = buffer->client;
> - struct drm_mode_fb_cmd fb_req = { };
> - const struct drm_format_info *info;
> + struct drm_mode_fb_cmd2 fb_req = { };
> int ret;
>
> - info = drm_format_info(format);
> - fb_req.bpp = drm_format_info_bpp(info, 0);
> - fb_req.depth = info->depth;
> fb_req.width = width;
> fb_req.height = height;
> - fb_req.handle = handle;
> - fb_req.pitch = buffer->pitch;
> + fb_req.pixel_format = format;
> + fb_req.handles[0] = handle;
> + fb_req.pitches[0] = buffer->pitch;
>
> - ret = drm_mode_addfb(client->dev, &fb_req, client->file);
> + ret = drm_mode_addfb2(client->dev, &fb_req, client->file);
> if (ret)
> return ret;

This should explicitly set the LINEAR modifier (and the modifier flag)
if the driver supports modifiers.

Cheers,
Daniel

\
 
 \ /
  Last update: 2023-08-24 17:14    [W:0.158 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site