All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	airlied@redhat.com, airlied@gmail.com, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	jyri.sarha@iki.fi
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable
Date: Fri, 17 Feb 2023 16:16:35 +0100	[thread overview]
Message-ID: <b60c1a7d-8d3f-ca75-edb4-da7c375204d8@suse.de> (raw)
In-Reply-To: <548d8a1b-4820-4825-7700-94c583530056@ideasonboard.com>


[-- Attachment #1.1: Type: text/plain, Size: 2936 bytes --]

Hi

Am 17.02.23 um 15:42 schrieb Tomi Valkeinen:
> On 09/02/2023 17:41, Thomas Zimmermann wrote:
>> Enable the primary plane for tidss hardware via atomic_enable.
>> Atomic helpers invoke this callback only when the plane becomes
>> active.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>   drivers/gpu/drm/tidss/tidss_plane.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/tidss/tidss_plane.c 
>> b/drivers/gpu/drm/tidss/tidss_plane.c
>> index 0b12405edb47..6bdd6e4a955a 100644
>> --- a/drivers/gpu/drm/tidss/tidss_plane.c
>> +++ b/drivers/gpu/drm/tidss/tidss_plane.c
>> @@ -124,6 +124,16 @@ static void tidss_plane_atomic_update(struct 
>> drm_plane *plane,
>>       hw_videoport = to_tidss_crtc(new_state->crtc)->hw_videoport;
>>       dispc_plane_setup(tidss->dispc, tplane->hw_plane_id, new_state, 
>> hw_videoport);
>> +}
>> +
>> +static void tidss_plane_atomic_enable(struct drm_plane *plane,
>> +                      struct drm_atomic_state *state)
>> +{
>> +    struct drm_device *ddev = plane->dev;
>> +    struct tidss_device *tidss = to_tidss(ddev);
>> +    struct tidss_plane *tplane = to_tidss_plane(plane);
>> +
>> +    dev_dbg(ddev->dev, "%s\n", __func__);
>>       dispc_plane_enable(tidss->dispc, tplane->hw_plane_id, true);
>>   }
>> @@ -151,6 +161,7 @@ static void drm_plane_destroy(struct drm_plane 
>> *plane)
>>   static const struct drm_plane_helper_funcs tidss_plane_helper_funcs = {
>>       .atomic_check = tidss_plane_atomic_check,
>>       .atomic_update = tidss_plane_atomic_update,
>> +    .atomic_enable = tidss_plane_atomic_enable,
>>       .atomic_disable = tidss_plane_atomic_disable,
>>   };
> 
> I haven't tested this, but looks fine to me.
> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> 
> One thought, though, is that we still do dispc_plane_enable(false) in 
> tidss_plane_atomic_update() when the plane is not visible. Not a 
> problem, but it would be nice to only enable/disable the plane inside 
> atomic_enable/disable.
> 
> Or maybe in cases like this the driver should only use atomic_update, 
> and do all the enabling and disabling there...

I agree. Drivers that have complex enable/disable semantics should 
probably handle everything in atomic_update.

Enabling/disabling is currently connected to the plane's framebuffer. As 
you said, it would be nice if this could be tied to visibility instead. 
The patch would be trivial, but some drivers might not like the change. 
I guess we could do an RFC patch and gather opinions.

Best regards
Thomas

> 
>   Tomi
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2023-02-17 15:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 15:41 [PATCH 0/6] drm: Add struct drm_plane_helper_funcs.atomic_enable Thomas Zimmermann
2023-02-09 15:41 ` [PATCH 1/6] drm/atomic-helper: Add atomic_enable plane-helper callback Thomas Zimmermann
2023-02-17 13:22   ` Javier Martinez Canillas
2023-02-09 15:41 ` [PATCH 2/6] drm/ast: Implement struct drm_plane_helper_funcs.atomic_enable Thomas Zimmermann
2023-02-17 13:25   ` Javier Martinez Canillas
2023-02-09 15:41 ` [PATCH 3/6] drm/mgag200: Remove disable handling from atomic_update Thomas Zimmermann
     [not found]   ` <87lekwifta.fsf@minerva.mail-host-address-is-not-set>
2023-02-20 14:12     ` Thomas Zimmermann
2023-02-21  9:05       ` Javier Martinez Canillas
2023-02-09 15:41 ` [PATCH 4/6] drm/mgag200: Implement struct drm_plane_helper_funcs.atomic_enable Thomas Zimmermann
2023-02-17 13:26   ` Javier Martinez Canillas
2023-02-09 15:41 ` [PATCH 5/6] drm/tidss: Remove return values from dispc_plane_{setup, enable}() Thomas Zimmermann
2023-02-17 13:27   ` Javier Martinez Canillas
2023-02-17 14:33   ` [PATCH 5/6] drm/tidss: Remove return values from dispc_plane_{setup,enable}() Tomi Valkeinen
2023-02-09 15:41 ` [PATCH 6/6] drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable Thomas Zimmermann
2023-02-17 13:28   ` Javier Martinez Canillas
2023-02-17 14:42   ` Tomi Valkeinen
2023-02-17 15:16     ` Thomas Zimmermann [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=b60c1a7d-8d3f-ca75-edb4-da7c375204d8@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jyri.sarha@iki.fi \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tomi.valkeinen@ideasonboard.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.