Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "open list:DRM DRIVERS FOR RENESAS"
	<linux-renesas-soc@vger.kernel.org>,
	"open list:DRM DRIVERS FOR RENESAS"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm: rcar-du: Write ESCR register per channel
Date: Thu, 30 Aug 2018 17:12:29 +0100	[thread overview]
Message-ID: <dcf2c007-c4e6-e82b-cb3c-cee6f6a8af1d@ideasonboard.com> (raw)
In-Reply-To: <88cc862b-cb07-8b1d-63ca-08f0c67f2337@ideasonboard.com>

Hi Jacopo,

On 30/08/18 17:00, Kieran Bingham wrote:
> Hi Jacopo,
> 
> On 22/08/18 08:21, Jacopo Mondi wrote:
>> The ESCR registers offset definition is confusing, as each channel is
>> equipped with an ESCR register instance, but the names suggest only ESCR and
>> ESCR2 are taken into account.
>>
>> Rename the offsets to a name that includes the channels they apply to, and
>> write them to each channel with 'rcar_du_crtc_write()'.
>>
>> Cosmetic patch, no functional changes intended.
> 
> Noted, ...
> 
>>
>> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
>> ---
>>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 3 +--
>>  drivers/gpu/drm/rcar-du/rcar_du_regs.h | 4 ++--
>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
>> index 5454884..714c1fc 100644
>> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
>> @@ -294,8 +294,7 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
>>  		}
>>  	}
>>  
>> -	rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? ESCR2 : ESCR,
>> -			    escr);
>> +	rcar_du_crtc_write(rcrtc, rcrtc->index % 2 ? ESCR13 : ESCR02, escr);

>>  	rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? OTAR2 : OTAR, 0);
>>  
>>  	/* Signal polarities */
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_regs.h b/drivers/gpu/drm/rcar-du/rcar_du_regs.h
>> index 9dfd220..ebc4aea 100644
>> --- a/drivers/gpu/drm/rcar-du/rcar_du_regs.h
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_regs.h
>> @@ -492,8 +492,8 @@
>>   * External Synchronization Control Registers
>>   */
>>  
>> -#define ESCR			0x10000
>> -#define ESCR2			0x31000
>> +#define ESCR02			0x10000
>> +#define ESCR13			0x01000
> 
> Assertion failed at:
>  ASSERT(ESCR2 == ESCR13)
> 
> This looks intentional ?
> but that makes this a bit more than a cosmetic change?

Aha - sorry - I see.

It looks like the '0x3' from '0x31000' was providing the offset into the
group I assume.


I'm surprised an equivalent offset wasn't removed from the ESCR02.

But I assume this is handled by the change of "rcar_du_crtc_write() ->
rcar_du_group_write()"?

Regards

Kieran



> 
> 
> 
> 
>>  #define ESCR_DCLKOINV		(1 << 25)
>>  #define ESCR_DCLKSEL_DCLKIN	(0 << 20)
>>  #define ESCR_DCLKSEL_CLKS	(1 << 20)
>>
> 

  reply	other threads:[~2018-08-30 20:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22  7:21 [PATCH 0/3] drm: rcar-du: A few cosmetic changes Jacopo Mondi
2018-08-22  7:21 ` [PATCH 1/3] drm: rcar-du: Rename and document dpll_ch field Jacopo Mondi
2018-08-22  8:17   ` Laurent Pinchart
2018-08-22  7:21 ` [PATCH 2/3] drm: rcar-du: Write ESCR register per channel Jacopo Mondi
2018-08-22 12:17   ` Laurent Pinchart
2018-08-30 16:00   ` Kieran Bingham
2018-08-30 16:12     ` Kieran Bingham [this message]
2018-08-22  7:21 ` [PATCH 3/3] drm: rcar-du: Write OTAR " Jacopo Mondi

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=dcf2c007-c4e6-e82b-cb3c-cee6f6a8af1d@ideasonboard.com \
    --to=kieran.bingham+renesas@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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