All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Nemesa Garg <nemesa.garg@intel.com>
Subject: Re: [PATCH v2 4/5] drm/i915/display: Add registers and compute the strength
Date: Wed, 18 Sep 2024 18:12:45 +0300	[thread overview]
Message-ID: <875xqtatci.fsf@intel.com> (raw)
In-Reply-To: <20240917092634.1109572-5-nemesa.garg@intel.com>

On Tue, 17 Sep 2024, Nemesa Garg <nemesa.garg@intel.com> wrote:
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 84b05b57ad52..41c6c56d83d6 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2396,6 +2396,23 @@
>  			_ID(id, _PS_COEF_SET0_DATA_1A, _PS_COEF_SET0_DATA_2A) + (set) * 8, \
>  			_ID(id, _PS_COEF_SET0_DATA_1B, _PS_COEF_SET0_DATA_2B) + (set) * 8)
>  
> +#define _SHARPNESS_CTL_A               0x682B0
> +#define SHARPNESS_CTL(trans)           _MMIO_PIPE2(dev_priv, trans, _SHARPNESS_CTL_A)

Oh, also, absolutely do not rely on implicit dev_priv variable in
there. Replace with display passed in explicitly. We've fixed this,
there are no implicit dev_priv variables used anywhere anymore. Do not
add new ones.

> +#define  FILTER_EN                      REG_BIT(31)
> +#define  FILTER_STRENGTH_MASK           REG_GENMASK(15, 8)
> +#define  FILTER_STRENGTH(x)             REG_FIELD_PREP(FILTER_STRENGTH_MASK, (x))
> +#define  FILTER_SIZE_MASK               REG_GENMASK(1, 0)
> +#define  FILTER_SIZE(x)                 REG_FIELD_PREP(FILTER_SIZE_MASK, (x))
> +
> +#define _SHRPLUT_DATA_A                        0x682B8
> +#define SHRPLUT_DATA(trans)            _MMIO_PIPE2(dev_priv, trans, _SHRPLUT_DATA_A)
> +
> +#define _SHRPLUT_INDEX_A               0x682B4
> +#define SHRPLUT_INDEX(trans)           _MMIO_PIPE2(dev_priv, trans, _SHRPLUT_INDEX_A)
> +#define  INDEX_AUTO_INCR               REG_BIT(10)
> +#define  INDEX_VALUE_MASK              REG_GENMASK(4, 0)
> +#define  INDEX_VALUE(x)                        REG_FIELD_PREP(INDEX_VALUE_MASK, (x))
          ^ 3 spaces      ^ tabs

Also, do check the big comment near the top of i915_reg.h about style
for the macros.

BR,
Jani.

> +
>  /* Display Internal Timeout Register */
>  #define RM_TIMEOUT		_MMIO(0x42060)
>  #define RM_TIMEOUT_REG_CAPTURE	_MMIO(0x420E0)

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2024-09-18 15:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-17  9:26 [PATCH 0/5] Introduce drm sharpness property Nemesa Garg
2024-09-17  9:26 ` [PATCH v2 1/5] drm: Introduce sharpness strength property Nemesa Garg
2024-09-17  9:26 ` [PATCH v3 2/5] drm/i915/display: Compute the scaler filter coefficients Nemesa Garg
2024-09-18 15:29   ` Jani Nikula
2024-09-17  9:26 ` [PATCH v3 3/5] drm/i915/display: Enable the second scaler for sharpness Nemesa Garg
2024-09-18 15:33   ` Jani Nikula
2024-09-17  9:26 ` [PATCH v2 4/5] drm/i915/display: Add registers and compute the strength Nemesa Garg
2024-09-18 15:07   ` Jani Nikula
2024-09-18 15:12   ` Jani Nikula [this message]
2024-09-17  9:26 ` [PATCH 5/5] drm/i915/display: Load the lut values and enable sharpness Nemesa Garg
2024-09-17 13:30 ` ✗ Fi.CI.CHECKPATCH: warning for Introduce drm sharpness property Patchwork
2024-09-17 13:30 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-09-17 13:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-17 17:23 ` ✗ Fi.CI.CHECKPATCH: warning for Introduce drm sharpness property (rev2) Patchwork
2024-09-17 17:23 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-09-17 17:32 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-18  8:26 ` ✗ Fi.CI.IGT: failure " 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=875xqtatci.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nemesa.garg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.