mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Arnd Bergmann <arnd@kernel.org>, David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	Maxime Ripard <mripard@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Sam Ravnborg <sam@ravnborg.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/ssd130x: drop DRM_GEM_SHADOW_PLANE_FUNCS override
Date: Thu, 27 Jul 2023 16:07:59 +0200	[thread overview]
Message-ID: <874jlpv45c.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20230727122412.2464210-1-arnd@kernel.org>

Arnd Bergmann <arnd@kernel.org> writes:

Hello Arnd,

Thanks a lot for your patch.

> From: Arnd Bergmann <arnd@arndb.de>
>
> It is not possible for ssd130x_primary_plane_funcs to use both
> its own reset/duplicate/destroy callbacks and the ones from
> DRM_GEM_SHADOW_PLANE_FUNCS:
>
> In file included from drivers/gpu/drm/solomon/ssd130x.c:29:
> include/drm/drm_gem_atomic_helper.h:100:18: error: initialized field overwritten [-Werror=override-init]
>   100 |         .reset = drm_gem_reset_shadow_plane, \
>   101 |         .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
>   102 |         .atomic_destroy_state = drm_gem_destroy_shadow_plane_state
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/solomon/ssd130x.c:744:9: note: in expansion of macro 'DRM_GEM_SHADOW_PLANE_FUNCS'
>   744 |         DRM_GEM_SHADOW_PLANE_FUNCS,
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
>

Gah, I missed that. I wonder how this compile warning doesn't show up for me.

> Since the custom callbacks were just added, I assume these are the
> ones it is meant to use, so remvoe the generic overrides.
>
> Fixes: 45b58669e532b ("drm/ssd130x: Allocate buffer in the plane's .atomic_check() callback")

Unfortunately that's not enough, because the plane atomic state handlers
that were introduced in that commit are broken so removing the macro will
regress the driver.

I've posted a patch that drops the macro but also fixes the handlers for
the driver to work with the custom callbacks:

https://lists.freedesktop.org/archives/dri-devel/2023-July/415897.html

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2023-07-27 14:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 12:24 Arnd Bergmann
2023-07-27 14:07 ` Javier Martinez Canillas [this message]
2023-07-27 14:47   ` Arnd Bergmann

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=874jlpv45c.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=sam@ravnborg.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®