public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"José Roberto de Souza" <jose.souza@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: Make use of unused variable in hsw_write_infoframe()
Date: Fri, 16 Feb 2018 10:41:09 +0200	[thread overview]
Message-ID: <87sha12uoq.fsf@intel.com> (raw)
In-Reply-To: <20180214133303.GN5453@intel.com>

On Wed, 14 Feb 2018, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Feb 13, 2018 at 04:29:17PM -0800, José Roberto de Souza wrote:
>> data_reg was not being used but it can be used to reduce the number of
>> calls to hsw_dip_data_reg() and just increment the reg by the size of
>> uint32.
>> 
>> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++--------
>>  1 file changed, 4 insertions(+), 8 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>> index f5d7bfb43006..ef258eac8ae8 100644
>> --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> @@ -393,15 +393,11 @@ static void hsw_write_infoframe(struct drm_encoder *encoder,
>>  	I915_WRITE(ctl_reg, val);
>>  
>>  	mmiowb();
>> -	for (i = 0; i < len; i += 4) {
>> -		I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder,
>> -					    type, i >> 2), *data);a
>
> i>>2 != 0
>
> just kill 'data_reg'

What Ville says.

Furthermore, you're *not* supposed to mess with the contents of
i915_reg_t. That we use a typedef to begin with means "don't touch the
guts of this one".

BR,
Jani.

>
>> -		data++;
>> -	}
>> +	for (i = 0; i < len; i += 4, data++, data_reg.reg += 4)
>> +		I915_WRITE(data_reg, *data);
>>  	/* Write every possible data byte to force correct ECC calculation. */
>> -	for (; i < data_size; i += 4)
>> -		I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder,
>> -					    type, i >> 2), 0);
>> +	for (; i < data_size; i += 4, data_reg.reg += 4)
>> +		I915_WRITE(data_reg, 0);
>>  	mmiowb();
>>  
>>  	val |= hsw_infoframe_enable(type);
>> -- 
>> 2.16.1
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-02-16  8:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14  0:29 [PATCH 1/5] drm/i915: add and enable DP AUX CH mutex José Roberto de Souza
2018-02-14  0:29 ` [PATCH 2/5] drm/i915: keep AUX powered while PSR is enabled José Roberto de Souza
2018-02-14  1:19   ` Rodrigo Vivi
2018-02-14  0:29 ` [PATCH 3/5] drm/i915: Share PSR and PSR2 VSC setup José Roberto de Souza
2018-02-14  0:29 ` [PATCH 4/5] drm/i915: Replace magic number with macro defined by drm José Roberto de Souza
2018-02-14  0:29 ` [PATCH 5/5] drm/i915: Make use of unused variable in hsw_write_infoframe() José Roberto de Souza
2018-02-14 13:33   ` Ville Syrjälä
2018-02-14 13:37     ` Chris Wilson
2018-02-14 14:29       ` Ville Syrjälä
2018-02-16  8:41     ` Jani Nikula [this message]
2018-02-14  0:36 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: add and enable DP AUX CH mutex Patchwork
2018-02-14  1:30 ` [PATCH 1/5] " Rodrigo Vivi
2018-02-14  2:30   ` Souza, Jose
2018-02-14 13:43   ` Ville Syrjälä
2018-02-14  7:32 ` Jani Nikula
2018-02-14  9:47 ` Jani Nikula
2018-02-14 16:21   ` Rodrigo Vivi
2018-02-14 16:37     ` Jani Nikula

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=87sha12uoq.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=ville.syrjala@linux.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