mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>, linux-kernel@vger.kernel.org
Cc: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/simpledrm: Drop superfluous primary plane .atomic_check return logic
Date: Mon, 5 Sep 2022 13:45:01 +0200	[thread overview]
Message-ID: <7376fe7b-3644-6081-2d7c-9d4f490da9c8@redhat.com> (raw)
In-Reply-To: <7e77aa04-8a0d-8d48-d156-2ed551d10e7c@suse.de>

On 9/5/22 13:37, Thomas Zimmermann wrote:
> Hi
> 

[...]

>>>> -	return 0;
>>>> +	return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
>>>> +						   DRM_PLANE_NO_SCALING,
>>>> +						   DRM_PLANE_NO_SCALING,
>>>> +						   false, false);
>>>
>>> I'm undecided on this change. I know it's correct and more to the point.
>>> But the call's logic is non-intuitive: the call either returns an error
>>> or we have to test ->visible afterwards. So I wrote it explicitly.
>>>
>>
>> Yes, but the check has no effect so I found it even less intuitive. Maybe
>> add a comment then if you wan to keep the current code?
>>   
>>> I saw that your change to ssd130x also uses the pattern. If we find more
>>> such drivers, we could implement the atomic check as a helper. I suggest
>>> drm_plane_helper_atomic_check_fixed() in drm_plane_helper.c
>>>
>>
>> Sure. I can add a preparatory change in v2 that adds that helper and then
>> use it in the follow-up patch.
>>
> 
> Maybe wait for your ssd130x changes to land and then you can convert 
> both drivers to the new helper.
> 

Makes sense. I'll do that.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


      reply	other threads:[~2022-09-05 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 11:12 Javier Martinez Canillas
2022-09-05 10:57 ` Thomas Zimmermann
2022-09-05 11:06   ` Javier Martinez Canillas
2022-09-05 11:37     ` Thomas Zimmermann
2022-09-05 11:45       ` Javier Martinez Canillas [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=7376fe7b-3644-6081-2d7c-9d4f490da9c8@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.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®