public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Val Packett <val@packett.cool>
Cc: Val Packett <val@packett.cool>,
	stable@vger.kernel.org, Sandy Huang <hjc@rock-chips.com>,
	Andy Yan <andy.yan@rock-chips.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] drm/rockchip: vop: clear DMA stop bit upon vblank on RK3066
Date: Mon, 27 May 2024 22:43:18 +0200	[thread overview]
Message-ID: <1817371.3VsfAaAtOV@diego> (raw)
In-Reply-To: <20240527071736.21784-1-val@packett.cool>

Hi Val,

Am Montag, 27. Mai 2024, 09:16:33 CEST schrieb Val Packett:
> On the RK3066, there is a bit that must be cleared, otherwise
> the picture does not show up on the display (at least for RGB).
> 
> Fixes: f4a6de8 ("drm: rockchip: vop: add rk3066 vop definitions")
> Cc: stable@vger.kernel.org
> Signed-off-by: Val Packett <val@packett.cool>
> ---
> v2: doing this on vblank makes more sense; added fixes tag

can you give a rationale for this please?

I.e. does this dma-stop bit need to be set on each vblank that happens
to push this frame to the display somehow?

Because at least in theory atomic_flush where this was living in in v1,
might happen at a slower interval?


Thanks
Heiko

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++++
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 1 +
>  drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 1 +
>  3 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index a13473b2d..2731fe2b2 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1766,6 +1766,12 @@ static void vop_handle_vblank(struct vop *vop)
>  	}
>  	spin_unlock(&drm->event_lock);
>  
> +	if (VOP_HAS_REG(vop, common, dma_stop)) {
> +		spin_lock(&vop->reg_lock);
> +		VOP_REG_SET(vop, common, dma_stop, 0);
> +		spin_unlock(&vop->reg_lock);
> +	}
> +
>  	if (test_and_clear_bit(VOP_PENDING_FB_UNREF, &vop->pending))
>  		drm_flip_work_commit(&vop->fb_unref_work, system_unbound_wq);
>  }
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> index b33e5bdc2..0cf512cc1 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> @@ -122,6 +122,7 @@ struct vop_common {
>  	struct vop_reg lut_buffer_index;
>  	struct vop_reg gate_en;
>  	struct vop_reg mmu_en;
> +	struct vop_reg dma_stop;
>  	struct vop_reg out_mode;
>  	struct vop_reg standby;
>  };
> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
> index b9ee02061..9bcb40a64 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
> @@ -466,6 +466,7 @@ static const struct vop_output rk3066_output = {
>  };
>  
>  static const struct vop_common rk3066_common = {
> +	.dma_stop = VOP_REG(RK3066_SYS_CTRL0, 0x1, 0),
>  	.standby = VOP_REG(RK3066_SYS_CTRL0, 0x1, 1),
>  	.out_mode = VOP_REG(RK3066_DSP_CTRL0, 0xf, 0),
>  	.cfg_done = VOP_REG(RK3066_REG_CFG_DONE, 0x1, 0),
> 





  parent reply	other threads:[~2024-05-27 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19  7:31 [PATCH 1/2] drm/rockchip: vop: clear DMA stop bit on flush on RK3066 Val Packett
2024-05-19  7:31 ` [PATCH 2/2] drm/rockchip: vop: enable VOP_FEATURE_INTERNAL_RGB " Val Packett
2024-05-19  7:59   ` Greg KH
2024-05-19  7:59 ` [PATCH 1/2] drm/rockchip: vop: clear DMA stop bit on flush " Greg KH
2024-05-19  8:38   ` Val Packett
2024-05-19  8:54     ` Greg KH
2024-05-27  7:16       ` [PATCH v2 1/2] drm/rockchip: vop: clear DMA stop bit upon vblank " Val Packett
2024-05-27  7:16         ` [PATCH v2 2/2] drm/rockchip: vop: enable VOP_FEATURE_INTERNAL_RGB " Val Packett
2024-05-27 20:43         ` Heiko Stübner [this message]
2024-05-27 22:13           ` [PATCH v2 1/2] drm/rockchip: vop: clear DMA stop bit upon vblank " Val Packett
2024-05-27 22:51             ` Heiko Stübner

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=1817371.3VsfAaAtOV@diego \
    --to=heiko@sntech.de \
    --cc=airlied@gmail.com \
    --cc=andy.yan@rock-chips.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=val@packett.cool \
    /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