mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Daniel Stone <daniel@fooishbar.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 5/8] drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2()
Date: Tue, 29 Aug 2023 11:19:58 +0200	[thread overview]
Message-ID: <87r0nmtdc1.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <CAMuHMdWyMNZJ3seWWHqigLfXwCnp47Xwzs1B6ixOyY+n7cir-A@mail.gmail.com>

Geert Uytterhoeven <geert@linux-m68k.org> writes:

Hello Geert and Daniel,

> Hi Daniel,
>
> On Thu, Aug 24, 2023 at 5:12 PM Daniel Stone <daniel@fooishbar.org> wrote:
>> 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.
>
> Thanks for your comment!
>
> I have no idea how to do that, and I do not know what the impact
> would be.  All I know is that the current implementation of
> drm_client_buffer_addfb() does not do that, so changing that in this
> patch would mean that this would no longer be a trivial conversion.
>

Agree with Geert, this patch basically just inlines the drm_mode_addfb()
implementation which already calls drm_mode_addfb2() but without setting
a struct drm_mode_fb_cmd2 .modifier field or anything modififers related.

So if that is wrong then it should be done as a follow-up patch (which
should also fix the drm_mode_addfb() helper implementation) ?

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2023-08-29  9:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 15:08 [PATCH v2 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-08-24 15:08 ` [PATCH v2 1/8] drm/dumb-buffers: Fix drm_mode_create_dumb() for bpp < 8 Geert Uytterhoeven
2023-08-31  7:40   ` Thomas Zimmermann
2023-08-31  7:56     ` Geert Uytterhoeven
2023-08-24 15:08 ` [PATCH v2 2/8] drm/ssd130x: Fix screen clearing Geert Uytterhoeven
2023-08-29  8:40   ` Javier Martinez Canillas
2023-08-29 21:12     ` Javier Martinez Canillas
2023-08-24 15:08 ` [PATCH v2 3/8] drm/ssd130x: Use bool for ssd130x_deviceinfo flags Geert Uytterhoeven
2023-08-29  8:44   ` Javier Martinez Canillas
2023-08-29 21:16     ` Javier Martinez Canillas
2023-08-24 15:08 ` [PATCH v2 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-08-29  9:01   ` Javier Martinez Canillas
2023-08-29 21:12     ` Javier Martinez Canillas
2023-08-31  8:01   ` Thomas Zimmermann
2023-08-31  8:22     ` Geert Uytterhoeven
2023-08-24 15:08 ` [PATCH v2 5/8] drm/client: Convert drm_client_buffer_addfb() to drm_mode_addfb2() Geert Uytterhoeven
2023-08-24 15:11   ` Daniel Stone
2023-08-24 15:22     ` Geert Uytterhoeven
2023-08-29  9:19       ` Javier Martinez Canillas [this message]
2023-08-31  8:15       ` Thomas Zimmermann
2023-08-24 15:08 ` [PATCH v2 6/8] drm/fb-helper: Pass buffer format via drm_fb_helper_surface_size Geert Uytterhoeven
2023-08-31  8:24   ` Thomas Zimmermann
2023-08-24 15:08 ` [PATCH v2 7/8] drm/fb-helper: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-08-31  8:57   ` Thomas Zimmermann
2023-08-24 15:08 ` [PATCH v2 8/8] drm/ssd130x: Switch preferred_bpp/depth to 1 Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0nmtdc1.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®