From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
David Airlie <airlied@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Gurchetan Singh <gurchetansingh@chromium.org>,
Chia-I Wu <olvaffe@gmail.com>,
virtualization@lists.linux.dev
Subject: Re: [PATCH 17/19] drm/virtio: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
Date: Wed, 16 Apr 2025 09:44:52 +0300 [thread overview]
Message-ID: <103b62c9-18e2-43b9-866a-4dace75df422@collabora.com> (raw)
In-Reply-To: <20250410163218.15130-18-ville.syrjala@linux.intel.com>
On 4/10/25 19:32, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Plumb the format info from .fb_create() all the way to
> drm_helper_mode_fill_fb_struct() to avoid the redundant
> lookup.
>
> Cc: David Airlie <airlied@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Cc: Gurchetan Singh <gurchetansingh@chromium.org>
> Cc: Chia-I Wu <olvaffe@gmail.com>
> Cc: virtualization@lists.linux.dev
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/virtio/virtgpu_display.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> index 93763b91bab5..e5805ca646c7 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> @@ -66,6 +66,7 @@ static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
> static int
> virtio_gpu_framebuffer_init(struct drm_device *dev,
> struct virtio_gpu_framebuffer *vgfb,
> + const struct drm_format_info *info,
> const struct drm_mode_fb_cmd2 *mode_cmd,
> struct drm_gem_object *obj)
> {
> @@ -73,7 +74,7 @@ virtio_gpu_framebuffer_init(struct drm_device *dev,
>
> vgfb->base.obj[0] = obj;
>
> - drm_helper_mode_fill_fb_struct(dev, &vgfb->base, NULL, mode_cmd);
> + drm_helper_mode_fill_fb_struct(dev, &vgfb->base, info, mode_cmd);
>
> ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);
> if (ret) {
> @@ -315,7 +316,7 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
> return ERR_PTR(-ENOMEM);
> }
>
> - ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj);
> + ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, info, mode_cmd, obj);
> if (ret) {
> kfree(virtio_gpu_fb);
> drm_gem_object_put(obj);
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
--
Best regards,
Dmitry
prev parent reply other threads:[~2025-04-16 6:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250410163218.15130-1-ville.syrjala@linux.intel.com>
2025-04-10 16:32 ` [PATCH 04/19] drm: Pass the format info to .fb_create() Ville Syrjala
2025-04-10 19:37 ` Laurent Pinchart
2025-04-11 6:36 ` Geert Uytterhoeven
2025-04-11 19:29 ` [PATCH v2 " Ville Syrjala
2025-04-10 16:32 ` [PATCH 05/19] drm: Allow the caller to pass in the format info to drm_helper_mode_fill_fb_struct() Ville Syrjala
2025-04-10 19:38 ` Laurent Pinchart
2025-04-10 16:32 ` [PATCH 07/19] drm/gem: Pass along the format info from .fb_create() " Ville Syrjala
2025-04-10 19:39 ` Laurent Pinchart
2025-04-10 22:58 ` kernel test robot
2025-04-11 19:31 ` [PATCH v2 " Ville Syrjala
2025-04-10 16:32 ` [PATCH 17/19] drm/virtio: " Ville Syrjala
2025-04-16 6:44 ` Dmitry Osipenko [this message]
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=103b62c9-18e2-43b9-866a-4dace75df422@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=olvaffe@gmail.com \
--cc=ville.syrjala@linux.intel.com \
--cc=virtualization@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).