All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: lucas.demarchi@intel.com
Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915/opregion: Register opreg func only for disp parts
Date: Mon, 07 Feb 2022 13:02:01 +0200	[thread overview]
Message-ID: <871r0frlcm.fsf@intel.com> (raw)
In-Reply-To: <20220206144311.5053-3-anshuman.gupta@intel.com>

On Sun, 06 Feb 2022, Anshuman Gupta <anshuman.gupta@intel.com> wrote:
> It need to register opregion_func only for graphics sku
> which has display. Use HAS_DISPLAY() to register
> opregion_func.
>
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_opregion.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c
> index 19f0558c0fbf..c1b558cdb99e 100644
> --- a/drivers/gpu/drm/i915/display/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/display/intel_opregion.c
> @@ -860,6 +860,9 @@ static int intel_opregion_setup(struct drm_i915_private *dev_priv)
>  	BUILD_BUG_ON(sizeof(struct opregion_asle) != 0x100);
>  	BUILD_BUG_ON(sizeof(struct opregion_asle_ext) != 0x400);
>  
> +	if (!opregion->opregion_func)
> +		return 0;
> +
>  	INIT_WORK(&opregion->asle_work, asle_work);
>  
>  	base = opregion->opregion_func->alloc_opregion(dev_priv);
> @@ -1296,9 +1299,9 @@ int intel_opregion_init(struct drm_i915_private *i915)
>  {
>  	struct intel_opregion *opregion = &i915->opregion;
>  
> -	if (IS_DGFX(i915))
> +	if (IS_DGFX(i915) && HAS_DISPLAY(i915))
>  		opregion->opregion_func = &dgfx_opregion_func;
> -	else
> +	else if (!IS_DGFX(i915))
>  		opregion->opregion_func = &igfx_opregion_func;

This does not match the commit message. I don't know whether the code or
the commit message is right.

BR,
Jani.

>  
>  	return intel_opregion_setup(i915);

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-02-07 11:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 14:43 [Intel-gfx] [PATCH 0/4] DGFX OpRegion Anshuman Gupta
2022-02-06 14:43 ` [Intel-gfx] [PATCH 1/4] drm/i915/opregion: Abstract opregion function Anshuman Gupta
2022-02-07 10:59   ` Jani Nikula
2022-02-06 14:43 ` [Intel-gfx] [PATCH 2/4] drm/i915/opregion: Register opreg func only for disp parts Anshuman Gupta
2022-02-07 11:02   ` Jani Nikula [this message]
2022-02-06 14:43 ` [Intel-gfx] [PATCH 3/4] drm/i915/dgfx: OPROM OpRegion Setup Anshuman Gupta
2022-02-06 17:15   ` kernel test robot
2022-02-06 14:43 ` [Intel-gfx] [PATCH 4/4] drm/i915/dgfx: Get VBT from rvda Anshuman Gupta
2022-02-06 15:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for DGFX OpRegion Patchwork
2022-02-06 15:15 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-06 15:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-06 17:05 ` [Intel-gfx] ✗ 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=871r0frlcm.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@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.