Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do the DRIVER_ATOMIC feature disable later
Date: Mon, 10 Oct 2022 14:50:23 +0300	[thread overview]
Message-ID: <87czazzym8.fsf@intel.com> (raw)
In-Reply-To: <20221007211108.3883-1-ville.syrjala@linux.intel.com>

On Sat, 08 Oct 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Currently we do the DRIVER_ATOMIC disable as almost the
> first thing during pci probe. That involves the use of
> DISPLAY_VER() which is perhaps a bit sketchy now that we
> may need to read that out from the hardware itself.
> Looks like we do populate a default value for it anyway
> so the current does at least still work.
>
> But let's make this safer anyway and move the code
> into intel_device_info_runtime_init() where we also
> handle the same thing for the !HAS_DISPLAY case.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_driver.c       | 4 ----
>  drivers/gpu/drm/i915/intel_device_info.c | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index fb3826dabe8b..cebe347f424c 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -894,10 +894,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (IS_ERR(i915))
>  		return PTR_ERR(i915);
>  
> -	/* Disable nuclear pageflip by default on pre-ILK */
> -	if (!i915->params.nuclear_pageflip && DISPLAY_VER(i915) < 5)
> -		i915->drm.driver_features &= ~DRIVER_ATOMIC;
> -
>  	ret = pci_enable_device(pdev);
>  	if (ret)
>  		goto out_fini;
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 908ec241fe71..b691b7c8c254 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -507,6 +507,10 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  		runtime->has_dmc = false;
>  		runtime->has_dsc = false;
>  	}
> +
> +	/* Disable nuclear pageflip by default on pre-ILK */
> +	if (!dev_priv->params.nuclear_pageflip && DISPLAY_VER(dev_priv) < 5)
> +		dev_priv->drm.driver_features &= ~DRIVER_ATOMIC;
>  }
>  
>  void intel_driver_caps_print(const struct intel_driver_caps *caps,

-- 
Jani Nikula, Intel Open Source Graphics Center

  parent reply	other threads:[~2022-10-10 11:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07 21:11 [Intel-gfx] [PATCH 1/2] drm/i915: Do the DRIVER_ATOMIC feature disable later Ville Syrjala
2022-10-07 21:11 ` [Intel-gfx] [PATCH 2/2] drm/i915: Enable atomic by default on ctg/elk Ville Syrjala
2022-10-10 11:51   ` Jani Nikula
2022-10-07 23:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915: Do the DRIVER_ATOMIC feature disable later Patchwork
2022-10-07 23:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-08  4:47 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-10-10 11:50 ` Jani Nikula [this message]
2022-10-11  6:58 ` [Intel-gfx] [PATCH 1/2] " Murthy, Arun R

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=87czazzym8.fsf@intel.com \
    --to=jani.nikula@linux.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