intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: vathsala nagaraju <vathsala.nagaraju@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Patil Deepti <deepti.patil@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 06/10] drm/i915/psr: set CHICKEN_TRANS for psr2
Date: Mon, 09 Jan 2017 09:39:13 +0530	[thread overview]
Message-ID: <58730CE9.5020209@intel.com> (raw)
In-Reply-To: <20170107194429.GP19067@nuc-i3427.alporthouse.com>

On Sunday 08 January 2017 01:14 AM, Chris Wilson wrote:
> On Sat, Jan 07, 2017 at 11:42:04PM +0530, vathsala nagaraju wrote:
>> As per bpsec, CHICKEN_TRANS_EDP bit 12 ,15
>> must be programmed.
>> Enable bit 12 for programmable header packet.
>> Enable bit 15 for Y cordinate support.
>>
>> v2: (Rodrigo)
>> - move CHICKEN_TRANS_EDP bit set logic right after setup_vsc
>>
>> v3:(Rodrigo)
>> - initialize chicken_trans to CHICKEN_TRANS_BIT12 instead of 0
>>
>> v4:(Rodrigo)
>> - initialize chicken_trans=0,add chicken_trans=CHICKEN_TRANS_BIT12
> Weird. Just scope the variable properly, use the correct type.
>   
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: Jim Bride <jim.bride@linux.intel.com>
>> Signed-off-by: vathsala nagaraju <vathsala.nagaraju@intel.com>
>> Signed-off-by: Patil Deepti <deepti.patil@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_reg.h  | 7 +++++++
>>   drivers/gpu/drm/i915/intel_psr.c | 7 +++++++
>>   2 files changed, 14 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
>> index 7830e6e..5ca506a 100644
>> --- a/drivers/gpu/drm/i915/i915_reg.h
>> +++ b/drivers/gpu/drm/i915/i915_reg.h
>> @@ -6449,6 +6449,13 @@ enum {
>>   #define  BDW_DPRS_MASK_VBLANK_SRD	(1 << 0)
>>   #define CHICKEN_PIPESL_1(pipe) _MMIO_PIPE(pipe, _CHICKEN_PIPESL_1_A, _CHICKEN_PIPESL_1_B)
>>   
>> +#define CHICKEN_TRANS_A         0x420c0
>> +#define CHICKEN_TRANS_B         0x420c4
>> +#define CHICKEN_TRANS(trans) _MMIO_TRANS(trans, CHICKEN_TRANS_A, CHICKEN_TRANS_B)
>> +#define TRANS_EDP              3
>> +#define CHICKEN_TRANS_BIT12    (1<<12)
>> +#define CHICKEN_TRANS_BIT15    (1<<15)
> Useless naming. Either given them proper names or don't.
>
>>   	if (!HAS_PSR(dev_priv)) {
> 		u32 chicken;
>
>>   		DRM_DEBUG_KMS("PSR not supported on this platform\n");
>> @@ -505,6 +506,12 @@ void intel_psr_enable(struct intel_dp *intel_dp)
>>   				dev_priv->psr.psr2_support = false;
>>   			else
>>   				skl_psr_setup_su_vsc(intel_dp);
>> +			/* Set CHICKEN_TRANS_BIT12 for programable header */
>> +			chicken_trans = CHICKEN_TRANS_BIT12;
> We can see you are setting CHICKEN_TRANS_BIT12, so don't bother
> repeating that. What programmable header? Why is this in a chicken bit,
> what is the bspec reference, all of those would be useful to answer.

Thanks for the review.
In bspec, it's part of psr2 enable sequence.
"Program Transcoder EDP VSC DIP header with a valid setting for PSR2 and
Set CHICKEN_TRANS_EDP(0x420cc) bit 12 for programmable header packet"

Will remove the comment.

>
>> +			/* Set CHICKEN_TRANS_BIT15 if Y coordinate is supported */
>> +			if (dev_priv->psr.y_cord_support)
>> +				chicken_trans |= CHICKEN_TRANS_BIT15;
> Again. Tell us why, we can read the code. Are the names meaningful? More
> meaningful than chicken |= BIT(15); ?

In bspec, for register CHICKEN_TRANS,  bit field name for 12 and 15 are spare 12 and spare 15.
Named CHICKEN_TRANS_BIT15 instead of spare 15. Will remove the comment and change to BIT(12) and BIT(15)

>
>> +			I915_WRITE(CHICKEN_TRANS(TRANS_EDP), chicken_trans);
>>   		} else {
>>   			/* set up vsc header for psr1 */
>>   			hsw_psr_setup_vsc(intel_dp);
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-09  4:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 18:58 [PATCH 06/10] drm/i915/psr: set CHICKEN_TRANS for psr2 vathsala nagaraju
2017-01-06 19:15 ` Vivi, Rodrigo
2017-01-07  2:52 ` vathsala nagaraju
2017-01-07 18:12 ` vathsala nagaraju
2017-01-07 19:44   ` [Intel-gfx] " Chris Wilson
2017-01-09  4:09     ` vathsala nagaraju [this message]
2017-01-09 13:08   ` vathsala nagaraju
2017-01-10 11:08     ` Ville Syrjälä
  -- strict thread matches above, loose matches on Subject: below --
2017-01-11 15:22 vathsala nagaraju
2017-01-12 19:01 ` vathsala nagaraju
2017-01-12 20:12   ` Vivi, Rodrigo
2017-01-13 18:50     ` [Intel-gfx] " Rodrigo Vivi
2017-01-16 10:04       ` Jani Nikula
2017-01-17 17:33         ` Rodrigo Vivi
2017-01-18  8:12           ` [Intel-gfx] " Jani Nikula
2017-01-18 21:50             ` Vivi, Rodrigo
2017-01-06 16:29 vathsala nagaraju
2017-01-06 17:26 ` Vivi, Rodrigo
2017-01-02 11:30 [PATCH 00/10] enable psr2 for idle_screen on y-cordinate panel vathsala nagaraju
2017-01-02 11:30 ` [PATCH 06/10] drm/i915/psr: set CHICKEN_TRANS for psr2 vathsala nagaraju
2017-01-05 17:57   ` Rodrigo Vivi
2016-12-30  5:25 [PATCH 00/10] enable psr2 for idle_screen on y-cordinate panel vathsala nagaraju
2016-12-30  5:25 ` [PATCH 06/10] drm/i915/psr: set CHICKEN_TRANS for psr2 vathsala nagaraju

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=58730CE9.5020209@intel.com \
    --to=vathsala.nagaraju@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=deepti.patil@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.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;
as well as URLs for NNTP newsgroup(s).