[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF6AEGvWJuOQqf7QqoVHB3CSM_uhgRLh3JZVFa=4m+FiD-hu3A@mail.gmail.com>
Date: Sun, 9 May 2021 09:28:35 -0700
From: Rob Clark <robdclark@...il.com>
To: dri-devel <dri-devel@...ts.freedesktop.org>
Cc: Rob Clark <robdclark@...omium.org>, Sean Paul <sean@...rly.run>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Abhinav Kumar <abhinavk@...eaurora.org>,
Stephen Boyd <swboyd@...omium.org>,
Maxime Ripard <maxime@...no.tech>,
Kalyan Thota <kalyan_t@...eaurora.org>,
Qinglang Miao <miaoqinglang@...wei.com>,
Hongbo Yao <yaohongbo@...wei.com>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@...r.kernel.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<freedreno@...ts.freedesktop.org>,
open list <linux-kernel@...r.kernel.org>,
Ryan Houdek <Houdek.Ryan@...-emu.org>
Subject: Re: [PATCH 2/2] drm/msm/dpu: Wire up needs_dirtyfb
On Sat, May 8, 2021 at 12:53 PM Rob Clark <robdclark@...il.com> wrote:
>
> From: Rob Clark <robdclark@...omium.org>
>
> Signed-off-by: Rob Clark <robdclark@...omium.org>
>From Ryan (sending this for him because mailing list workflow is lame):
I have tested this on my end and it resolves the 120hz problem.
Tested-By: Ryan Houdek <Houdek.Ryan@...-emu.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 5a74f93e29da..868ee6136438 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -143,6 +143,19 @@ static bool dpu_crtc_get_scanout_position(struct drm_crtc *crtc,
> return true;
> }
>
> +static bool dpu_crtc_needs_dirtyfb(struct drm_crtc *crtc)
> +{
> + struct drm_encoder *encoder;
> +
> + drm_for_each_encoder_mask (encoder, crtc->dev, crtc->state->encoder_mask) {
> + if (dpu_encoder_get_intf_mode(encoder) == INTF_MODE_CMD) {
> + return true;
> + }
> + }
> +
> + return false;
> +}
> +
> static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
> struct dpu_plane_state *pstate, struct dpu_format *format)
> {
> @@ -1343,6 +1356,7 @@ static const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = {
> .atomic_begin = dpu_crtc_atomic_begin,
> .atomic_flush = dpu_crtc_atomic_flush,
> .get_scanout_position = dpu_crtc_get_scanout_position,
> + .needs_dirtyfb = dpu_crtc_needs_dirtyfb,
> };
>
> /* initialize crtc */
> --
> 2.30.2
>
Powered by blists - more mailing lists