[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d278785e-be67-cfa2-ead2-a0003c430569@quicinc.com>
Date: Mon, 7 Aug 2023 09:39:01 -0700
From: Jessica Zhang <quic_jesszhan@...cinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>
CC: <quic_abhinavk@...cinc.com>, <ppaalanen@...il.com>,
<contact@...rsion.fr>, <laurent.pinchart@...asonboard.com>,
<sebastian.wick@...hat.com>, <ville.syrjala@...ux.intel.com>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <freedreno@...ts.freedesktop.org>,
<wayland-devel@...ts.freedesktop.org>
Subject: Re: [PATCH RFC v5 04/10] drm/atomic: Add pixel source to plane state
dump
On 7/28/2023 5:04 PM, Dmitry Baryshkov wrote:
> On 28/07/2023 20:02, Jessica Zhang wrote:
>> Add pixel source to the atomic plane state dump
>>
>> Signed-off-by: Jessica Zhang <quic_jesszhan@...cinc.com>
>> ---
>> drivers/gpu/drm/drm_atomic.c | 1 +
>> drivers/gpu/drm/drm_crtc_internal.h | 2 ++
>> drivers/gpu/drm/drm_plane.c | 12 ++++++++++++
>> 3 files changed, 15 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
>> index b4c6ffc438da..c38014abc590 100644
>> --- a/drivers/gpu/drm/drm_atomic.c
>> +++ b/drivers/gpu/drm/drm_atomic.c
>> @@ -713,6 +713,7 @@ static void drm_atomic_plane_print_state(struct
>> drm_printer *p,
>> drm_printf(p, "plane[%u]: %s\n", plane->base.id, plane->name);
>> drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name :
>> "(null)");
>> + drm_printf(p, "\tpixel-source=%s\n",
>> drm_plane_get_pixel_source_name(state->pixel_source));
>> drm_printf(p, "\tfb=%u\n", state->fb ? state->fb->base.id : 0);
>> if (state->fb)
>> drm_framebuffer_print_info(p, 2, state->fb);
>> diff --git a/drivers/gpu/drm/drm_crtc_internal.h
>> b/drivers/gpu/drm/drm_crtc_internal.h
>> index 501a10edd0e1..75b59ec9f1be 100644
>> --- a/drivers/gpu/drm/drm_crtc_internal.h
>> +++ b/drivers/gpu/drm/drm_crtc_internal.h
>> @@ -38,6 +38,7 @@ enum drm_color_encoding;
>> enum drm_color_range;
>> enum drm_connector_force;
>> enum drm_mode_status;
>> +enum drm_plane_pixel_source;
>> struct drm_atomic_state;
>> struct drm_bridge;
>> @@ -267,6 +268,7 @@ int drm_plane_check_pixel_format(struct drm_plane
>> *plane,
>> u32 format, u64 modifier);
>> struct drm_mode_rect *
>> __drm_plane_get_damage_clips(const struct drm_plane_state *state);
>> +const char *drm_plane_get_pixel_source_name(enum
>> drm_plane_pixel_source pixel_source);
>> /* drm_bridge.c */
>> void drm_bridge_detach(struct drm_bridge *bridge);
>> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
>> index f342cf15412b..4188b3491625 100644
>> --- a/drivers/gpu/drm/drm_plane.c
>> +++ b/drivers/gpu/drm/drm_plane.c
>> @@ -1487,6 +1487,18 @@ __drm_plane_get_damage_clips(const struct
>> drm_plane_state *state)
>> state->fb_damage_clips->data : NULL);
>> }
>> +const char *drm_plane_get_pixel_source_name(enum
>> drm_plane_pixel_source pixel_source)
>> +{
>> + switch(pixel_source) {
>> + case DRM_PLANE_PIXEL_SOURCE_NONE:
>> + return "NONE";
>> + case DRM_PLANE_PIXEL_SOURCE_FB:
>> + return "fb";
>> + default:
>> + return "";
>> + }
>> +}
>
> Please use DRM_ENUM_NAME_FN instead.
Hi Dmitry,
Acked.
Thanks,
Jessica Zhang
>
>> +
>> /**
>> * drm_plane_get_damage_clips - Returns damage clips.
>> * @state: Plane state.
>>
>
> --
> With best wishes
> Dmitry
>
Powered by blists - more mailing lists