mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mihail Atanassov <Mihail.Atanassov@arm.com>
To: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
Cc: nd <nd@arm.com>,
	"Jonathan Chai (Arm Technology China)" <Jonathan.Chai@arm.com>,
	"Lowry Li (Arm Technology China)" <Lowry.Li@arm.com>,
	"Tiannan Zhu (Arm Technology China)" <Tiannan.Zhu@arm.com>,
	nd <nd@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>, Ben Davis <Ben.Davis@arm.com>,
	"Oscar Zhang (Arm Technology China)" <Oscar.Zhang@arm.com>,
	"Channing Chen (Arm Technology China)" <Channing.Chen@arm.com>
Subject: Re: [PATCH] drm/komeda: Correct d71 register block counting
Date: Wed, 11 Dec 2019 17:30:01 +0000	[thread overview]
Message-ID: <1904852.g9mvNTCQN0@e123338-lin> (raw)
In-Reply-To: <20191210061015.25905-1-james.qian.wang@arm.com>

On Tuesday, 10 December 2019 06:10:34 GMT james qian wang (Arm Technology China) wrote:
> Per HW, d71->num_blocks includes reserved blocks but no PERIPH block,
> correct the block counting accordingly.
> D71 happens to only have one reserved block and periph block, which
> hides this counting error.
> 
> Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
> ---
>  drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> index 822b23a1ce75..d53f95dea0a1 100644
> --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c
> @@ -414,8 +414,11 @@ static int d71_enum_resources(struct komeda_dev *mdev)
>  		d71->pipes[i] = to_d71_pipeline(pipe);
>  	}
>  
> -	/* loop the register blks and probe */
> -	i = 2; /* exclude GCU and PERIPH */
> +	/* loop the register blks and probe.
> +	 * NOTE: d71->num_blocks includes reserved blocks.
> +	 * d71->num_blocks = GCU + valid blocks + reserved blocks
> +	 */
> +	i = 1; /* exclude GCU */
>  	offset = D71_BLOCK_SIZE; /* skip GCU */
>  	while (i < d71->num_blocks) {
>  		blk_base = mdev->reg_base + (offset >> 2);
> @@ -425,9 +428,9 @@ static int d71_enum_resources(struct komeda_dev *mdev)
>  			err = d71_probe_block(d71, &blk, blk_base);
>  			if (err)
>  				goto err_cleanup;
> -			i++;
>  		}
>  
> +		i++;
>  		offset += D71_BLOCK_SIZE;
>  	}
>  
> 

Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>

-- 
Mihail




      reply	other threads:[~2019-12-11 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  6:10 james qian wang (Arm Technology China)
2019-12-11 17:30 ` Mihail Atanassov [this message]

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=1904852.g9mvNTCQN0@e123338-lin \
    --to=mihail.atanassov@arm.com \
    --cc=Ben.Davis@arm.com \
    --cc=Channing.Chen@arm.com \
    --cc=Jonathan.Chai@arm.com \
    --cc=Lowry.Li@arm.com \
    --cc=Oscar.Zhang@arm.com \
    --cc=Tiannan.Zhu@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=james.qian.wang@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.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

all inboxes | Powered by JetHome®