public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/wm: use REG_FIELD_PREP for PLANE_WM_BLOCKS_MASK
Date: Wed, 23 Feb 2022 12:36:04 +0200	[thread overview]
Message-ID: <87k0dl7tuz.fsf@intel.com> (raw)
In-Reply-To: <YhYJvZ/Qb/uvGln5@intel.com>

On Wed, 23 Feb 2022, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Feb 23, 2022 at 12:10:23PM +0200, Jani Nikula wrote:
>> Use REG_FIELD_PREP for completeness, and to avoid bitwise operations
>> with different sizes.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 5af16ca4dabd..3411ebaa767f 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -5930,7 +5930,7 @@ static void skl_write_wm_level(struct drm_i915_private *dev_priv,
>>  		val |= PLANE_WM_EN;
>>  	if (level->ignore_lines)
>>  		val |= PLANE_WM_IGNORE_LINES;
>> -	val |= level->blocks;
>> +	val |= REG_FIELD_PREP(PLANE_WM_BLOCKS_MASK, level->blocks);
>>  	val |= REG_FIELD_PREP(PLANE_WM_LINES_MASK, level->lines);
>>  
>>  	intel_de_write_fw(dev_priv, reg, val);a
>
> skl_wm_level_from_reg_val() could use similar treatment for symmetry.

Aye. v2 sent.

>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>> -- 
>> 2.30.2

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-02-23 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 10:10 [Intel-gfx] [PATCH] drm/i915/wm: use REG_FIELD_PREP for PLANE_WM_BLOCKS_MASK Jani Nikula
2022-02-23 10:17 ` Ville Syrjälä
2022-02-23 10:36   ` Jani Nikula [this message]
2022-02-23 10:35 ` [Intel-gfx] [PATCH v2] drm/i915/wm: use REG_FIELD_{PREP, GET} " Jani Nikula
2022-02-23 10:40   ` Ville Syrjälä
2022-03-01 12:37     ` Jani Nikula
2022-02-23 19:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/wm: use REG_FIELD_PREP for PLANE_WM_BLOCKS_MASK (rev2) Patchwork
2022-02-24  4:55 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=87k0dl7tuz.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --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