mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Jessica Zhang <quic_jesszhan@quicinc.com>,
	Pekka Paalanen <ppaalanen@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
	sebastian.wick@redhat.com,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	quic_abhinavk@quicinc.com, Maxime Ripard <mripard@kernel.org>,
	linux-kernel@vger.kernel.org, Rob Clark <robdclark@gmail.com>,
	laurent.pinchart@ideasonboard.com,
	Daniel Vetter <daniel@ffwll.ch>,
	contact@emersion.fr,
	Marijn Suijten <marijn.suijten@somainline.org>,
	wayland-devel@lists.freedesktop.org,
	David Airlie <airlied@gmail.com>,
	ville.syrjala@linux.intel.com
Subject: Re: [Freedreno] [PATCH RFC v6 07/10] drm/atomic: Loosen FB atomic checks
Date: Sun, 24 Sep 2023 13:23:13 +0300	[thread overview]
Message-ID: <6851b864-447f-453f-8b34-1fbb6e97eefe@linaro.org> (raw)
In-Reply-To: <752176d8-23f4-4689-8bf4-db27f153fd39@quicinc.com>

On 22/09/2023 20:49, Jessica Zhang wrote:
> 
> 
> On 8/29/2023 1:22 AM, Pekka Paalanen wrote:
>> On Mon, 28 Aug 2023 17:05:13 -0700
>> Jessica Zhang <quic_jesszhan@quicinc.com> wrote:
>>
>>> Loosen the requirements for atomic and legacy commit so that, in cases
>>> where pixel_source != FB, the commit can still go through.
>>>
>>> This includes adding framebuffer NULL checks in other areas to 
>>> account for
>>> FB being NULL when non-FB pixel sources are enabled.
>>>
>>> To disable a plane, the pixel_source must be NONE or the FB must be NULL
>>> if pixel_source == FB.
>>>
>>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>>> ---
>>>   drivers/gpu/drm/drm_atomic.c        | 20 +++++++++++---------
>>>   drivers/gpu/drm/drm_atomic_helper.c | 36 
>>> ++++++++++++++++++++----------------
>>>   include/drm/drm_atomic_helper.h     |  4 ++--
>>>   include/drm/drm_plane.h             | 29 +++++++++++++++++++++++++++++
>>>   4 files changed, 62 insertions(+), 27 deletions(-)
>>
>> ...
>>
>>> diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
>>> index a58f84b6bd5e..4c5b7bcdb25c 100644
>>> --- a/include/drm/drm_plane.h
>>> +++ b/include/drm/drm_plane.h
>>> @@ -992,6 +992,35 @@ static inline struct drm_plane 
>>> *drm_plane_find(struct drm_device *dev,
>>>   #define drm_for_each_plane(plane, dev) \
>>>       list_for_each_entry(plane, &(dev)->mode_config.plane_list, head)
>>> +/**
>>> + * drm_plane_solid_fill_enabled - Check if solid fill is enabled on 
>>> plane
>>> + * @state: plane state
>>> + *
>>> + * Returns:
>>> + * Whether the plane has been assigned a solid_fill_blob
>>> + */
>>> +static inline bool drm_plane_solid_fill_enabled(struct 
>>> drm_plane_state *state)
>>> +{
>>> +    if (!state)
>>> +        return false;
>>> +    return state->pixel_source == DRM_PLANE_PIXEL_SOURCE_SOLID_FILL 
>>> && state->solid_fill_blob;
>>> +}
>>> +
>>> +static inline bool drm_plane_has_visible_data(const struct 
>>> drm_plane_state *state)
>>> +{
>>> +    switch (state->pixel_source) {
>>> +    case DRM_PLANE_PIXEL_SOURCE_NONE:
>>> +        return false;
>>> +    case DRM_PLANE_PIXEL_SOURCE_SOLID_FILL:
>>> +        return state->solid_fill_blob != NULL;
>>
>> This reminds me, new UAPI docs did not say what the requirements are for
>> choosing solid fill pixel source. Is the atomic commit rejected if
>> pixel source is solid fill, but solid_fill property has no blob?
> 
> Hi Pekka,
> 
> Yes, if pixel_source is solid_fill and the solid_fill property blob 
> isn't set, the atomic commit should throw an error.
> 
> Will document this in the UAPI.

I don't see a corresponding error check in atomic_check() functions. 
Could you please check that there is one, as you are updating the uAPI.

> 
> Thanks,
> 
> Jessica Zhang
> 
>>
>> This should be doc'd.
>>
>>
>> Thanks,
>> pq
>>
>>> +    case DRM_PLANE_PIXEL_SOURCE_FB:
>>> +    default:
>>> +        WARN_ON(state->pixel_source != DRM_PLANE_PIXEL_SOURCE_FB);
>>> +    }
>>> +
>>> +    return state->fb != NULL;
>>> +}
>>> +
>>>   bool drm_any_plane_has_format(struct drm_device *dev,
>>>                     u32 format, u64 modifier);
>>>
>>

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-09-24 10:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  0:05 [PATCH RFC v6 00/10] Support for Solid Fill Planes Jessica Zhang
2023-08-29  0:05 ` [PATCH RFC v6 01/10] drm: Introduce pixel_source DRM plane property Jessica Zhang
2023-08-29  7:48   ` Pekka Paalanen
2023-10-19 10:45     ` Sebastian Wick
2023-09-24 10:06   ` Dmitry Baryshkov
2023-10-19  4:59     ` Jessica Zhang
2023-10-19 14:22   ` Simon Ser
2023-08-29  0:05 ` [PATCH RFC v6 02/10] drm: Introduce solid fill " Jessica Zhang
2023-08-29  8:10   ` Pekka Paalanen
2023-08-29 15:23   ` Sebastian Wick
2023-08-29  0:05 ` [PATCH RFC v6 03/10] drm: Add solid fill pixel source Jessica Zhang
2023-08-29  8:11   ` Pekka Paalanen
2023-08-29  0:05 ` [PATCH RFC v6 04/10] drm/atomic: Add pixel source to plane state dump Jessica Zhang
2023-09-24 10:08   ` Dmitry Baryshkov
2023-08-29  0:05 ` [PATCH RFC v6 05/10] drm/atomic: Add solid fill data " Jessica Zhang
2023-08-29  8:14   ` Pekka Paalanen
2023-09-24 10:09   ` Dmitry Baryshkov
2023-08-29  0:05 ` [PATCH RFC v6 06/10] drm/atomic: Move framebuffer checks to helper Jessica Zhang
2023-08-29  0:05 ` [PATCH RFC v6 07/10] drm/atomic: Loosen FB atomic checks Jessica Zhang
2023-08-29  8:22   ` Pekka Paalanen
2023-09-22 17:49     ` [Freedreno] " Jessica Zhang
2023-09-24 10:23       ` Dmitry Baryshkov [this message]
2023-10-17  0:40         ` Jessica Zhang
2023-10-17  7:25           ` Dmitry Baryshkov
2023-09-24 10:19   ` Dmitry Baryshkov
2023-08-29  0:05 ` [PATCH RFC v6 08/10] drm/msm/dpu: Allow NULL FBs in atomic commit Jessica Zhang
2023-09-24 10:29   ` Dmitry Baryshkov
2023-10-19  0:59     ` Jessica Zhang
2023-08-29  0:05 ` [PATCH RFC v6 09/10] drm/msm/dpu: Use DRM solid_fill property Jessica Zhang
2023-09-25 10:34   ` Dmitry Baryshkov
2023-08-29  0:05 ` [PATCH RFC v6 10/10] drm/msm/dpu: Add solid fill and pixel source properties Jessica Zhang
2023-08-29 15:42 ` [PATCH RFC v6 00/10] Support for Solid Fill Planes Sebastian Wick
2023-09-26 15:25 ` Harry Wentland

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=6851b864-447f-453f-8b34-1fbb6e97eefe@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=contact@emersion.fr \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=ppaalanen@gmail.com \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=sebastian.wick@redhat.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wayland-devel@lists.freedesktop.org \
    /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®