Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Rob Clark <robdclark@gmail.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org, Liviu Dudau <liviu.dudau@arm.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	freedreno@lists.freedesktop.org
Subject: Re: [RFC 3/4] drm/msm/mdp5: add config for writeback pipes
Date: Fri, 23 Feb 2018 11:32:02 -0500	[thread overview]
Message-ID: <20180223163202.GM223881@art_vandelay> (raw)
In-Reply-To: <20180223131758.18362-4-robdclark@gmail.com>

On Fri, Feb 23, 2018 at 08:17:53AM -0500, Rob Clark wrote:
> Note there seems to be a slight disagreement between public 8x16 HRD
> (which claims WB2 has offset of 0x65000, relative to start of MDP), and
> reality (which claims WB2 has offset of 0x64800).  I sided with reality.
> 
> There should also be a WB0 attached to LM0 (which routes to DSI
> interface).  It isn't clear if this can be used at the same time as
> output to DSI, which would be hugely useful.  I was unable to get this
> to work (with HDMI bridge chip on db410c, so DSI in video mode).
> 
> This will be needed to implement writeback support, but also useful
> to remove a manual hack to the generated headers (since rnndb register
> docs for WB had been merged long ago).
> 
> Also fixes LM3 offset.
> 
> Signed-off-by: Rob Clark <robdclark@gmail.com>

I'm not familiar with the hw, but I don't see any programming errors, so:

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h |  2 --
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 17 +++++++++++------
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h | 11 +++++++++++
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c |  1 +
>  4 files changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h b/drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h
> index d9c10e02ee41..bebcbabb1fe4 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h
> @@ -1391,13 +1391,11 @@ static inline uint32_t REG_MDP5_PP_FBC_LOSSY_MODE(uint32_t i0) { return 0x000000
>  static inline uint32_t __offset_WB(uint32_t idx)
>  {
>  	switch (idx) {
> -#if 0  /* TEMPORARY until patch that adds wb.base[] is merged */
>  		case 0: return (mdp5_cfg->wb.base[0]);
>  		case 1: return (mdp5_cfg->wb.base[1]);
>  		case 2: return (mdp5_cfg->wb.base[2]);
>  		case 3: return (mdp5_cfg->wb.base[3]);
>  		case 4: return (mdp5_cfg->wb.base[4]);
> -#endif
>  		default: return INVALID_IDX(idx);
>  	}
>  }
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> index 824067d2d427..f92e68cdeeef 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
> @@ -300,8 +300,8 @@ const struct mdp5_cfg_hw msm8x16_config = {
>  		},
>  	},
>  	.ctl = {
> -		.count = 5,
> -		.base = { 0x01000, 0x01200, 0x01400, 0x01600, 0x01800 },
> +		.count = 3,
> +		.base = { 0x01000, 0x01200, 0x01400 },
>  		.flush_hw_mask = 0x4003ffff,
>  	},
>  	.pipe_vig = {
> @@ -324,7 +324,7 @@ const struct mdp5_cfg_hw msm8x16_config = {
>  	},
>  	.lm = {
>  		.count = 2, /* LM0 and LM3 */
> -		.base = { 0x44000, 0x47000 },
> +		.base = { [0] = 0x44000, [3] = 0x47000 },
>  		.instances = {
>  				{ .id = 0, .pp = 0, .dspp = 0,
>  				  .caps = MDP_LM_CAP_DISPLAY, },
> @@ -338,12 +338,17 @@ const struct mdp5_cfg_hw msm8x16_config = {
>  	.dspp = {
>  		.count = 1,
>  		.base = { 0x54000 },
> -
> +	},
> +	.wb = {
> +		.count = 1,
> +		.base = { [0] = 0x64000, [2] = 0x64800 },
> +		.instances = {
> +			{ .id = 2, .lm = 3 },
> +		},
>  	},
>  	.intf = {
> -		.base = { 0x00000, 0x6a800 },
> +		.base = { 0x6a000, 0x6a800, 0x6b000, 0x6b800 },
>  		.connect = {
> -			[0] = INTF_DISABLED,
>  			[1] = INTF_DSI,
>  		},
>  	},
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h
> index 75910d0f2f4c..2e529fb2f9ee 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.h
> @@ -77,6 +77,16 @@ struct mdp5_mdp_block {
>  	uint32_t caps;			/* MDP capabilities: MDP_CAP_xxx bits */
>  };
>  
> +struct mdp5_wb_instance {
> +	int id;
> +	int lm;
> +};
> +
> +struct mdp5_wb_block {
> +	MDP5_SUB_BLOCK_DEFINITION;
> +	struct mdp5_wb_instance instances[MAX_BASES];
> +};
> +
>  #define MDP5_INTF_NUM_MAX	5
>  
>  struct mdp5_intf_block {
> @@ -100,6 +110,7 @@ struct mdp5_cfg_hw {
>  	struct mdp5_sub_block pp;
>  	struct mdp5_sub_block dsc;
>  	struct mdp5_sub_block cdm;
> +	struct mdp5_wb_block wb;
>  	struct mdp5_intf_block intf;
>  
>  	uint32_t max_clk;
> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> index 6d8e3a9a6fc0..1f44d8f15ce1 100644
> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
> @@ -652,6 +652,7 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
>  	pm_runtime_get_sync(&pdev->dev);
>  	for (i = 0; i < MDP5_INTF_NUM_MAX; i++) {
>  		if (mdp5_cfg_intf_is_virtual(config->hw->intf.connect[i]) ||
> +		    (config->hw->intf.connect[i] == INTF_DISABLED) ||
>  		    !config->hw->intf.base[i])
>  			continue;
>  		mdp5_write(mdp5_kms, REG_MDP5_INTF_TIMING_ENGINE_EN(i), 0);
> -- 
> 2.14.3
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-02-23 16:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 13:17 [RFC 0/4] drm/msm/mdp5: writeback connector support Rob Clark
     [not found] ` <20180223131758.18362-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-23 13:17   ` [RFC 1/4] drm: Add writeback connector type Rob Clark
     [not found]     ` <20180223131758.18362-2-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-23 14:00       ` Liviu Dudau
     [not found]         ` <20180223140018.GV9111-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2018-02-23 14:24           ` Rob Clark
     [not found]             ` <CAF6AEGvEZ6Z3dSHk9keb9MeQO28epeMey1zwsY51=UUHUH7FZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-23 14:27               ` Liviu Dudau
2018-02-23 15:59       ` Sean Paul
2018-02-23 16:21         ` Liviu Dudau
     [not found]           ` <20180223162104.GX9111-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2018-02-23 16:39             ` Sean Paul
2018-02-23 16:52               ` Liviu Dudau
2018-02-23 16:25         ` Rob Clark
2018-02-23 16:43           ` Sean Paul
2018-02-23 16:48             ` Liviu Dudau
     [not found]               ` <20180223164858.GY9111-A/Nd4k6kWRHZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2018-02-23 17:04                 ` Sean Paul
2018-02-23 13:17   ` [RFC 2/4] drm: writeback: Add out-fences for writeback connectors Rob Clark
     [not found]     ` <20180223131758.18362-3-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-23 16:14       ` Sean Paul
2018-02-23 13:17   ` [RFC 3/4] drm/msm/mdp5: add config for writeback pipes Rob Clark
2018-02-23 16:32     ` Sean Paul [this message]
2018-02-23 13:17   ` [RFC 4/4] drm/msm/mdp5: writeback support Rob Clark
     [not found]     ` <20180223131758.18362-5-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-23 16:30       ` Sean Paul
2018-02-23 18:15         ` Rob Clark
     [not found]           ` <CAF6AEGvAQu6zVO8d75YJgDLtpHJFxU0JGw8S7SR7HGOfMNPHXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-26 15:41             ` Sean Paul

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=20180223163202.GM223881@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=narmstrong@baylibre.com \
    --cc=robdclark@gmail.com \
    /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