From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: 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>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
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: Fri, 22 Sep 2023 10:49:23 -0700 [thread overview]
Message-ID: <752176d8-23f4-4689-8bf4-db27f153fd39@quicinc.com> (raw)
In-Reply-To: <20230829112230.7106a8bf@eldfell>
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.
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);
>>
>>
>
next prev parent reply other threads:[~2023-09-22 17:51 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 ` Jessica Zhang [this message]
2023-09-24 10:23 ` [Freedreno] " Dmitry Baryshkov
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=752176d8-23f4-4689-8bf4-db27f153fd39@quicinc.com \
--to=quic_jesszhan@quicinc.com \
--cc=airlied@gmail.com \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--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=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