All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Nikula, Jani" <jani.nikula@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 4/4] drm/i915: stop conflating HAS_DISPLAY() and disabled display
Date: Wed, 4 Sep 2019 23:57:29 +0000	[thread overview]
Message-ID: <8c187aebde419b746a1f8f42548aec2fa4e90223.camel@intel.com> (raw)
In-Reply-To: <070054f632d4ce26740949919660ed61d195942e.1567446845.git.jani.nikula@intel.com>

On Mon, 2019-09-02 at 21:08 +0300, Jani Nikula wrote:
> Stop setting ->pipe_mask to zero when display is disabled, allowing
> us
> to have different code paths for not actually having display
> hardware,
> and having display hardware disabled. This lets us develop those two
> avenues independently.
> 
> There are no functional changes for when there is no display.
> However,
> all uses of for_each_pipe() and for_each_pipe_masked() will start
> running for the disabled display case. Put one of the more
> significant
> ones behind checks for INTEL_DISPLAY_ENABLED(), otherwise the cases
> should not be hit with disabled display, or they seem benign. Fingers
> crossed.
> 
> All in all, this might not be the ideal solution. In fact we may have
> had something along the lines of this in the past, but we ended up
> conflating the two cases. Possibly even by recommendation by yours
> truly; I did not dare dig up that part of the history. But the
> perfect
> is the enemy of the good, this is a straightforward change, and lets
> us
> get actual work done in both fronts without interfering with each
> other.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++-----
>  drivers/gpu/drm/i915/intel_device_info.c     |  8 ++------
>  2 files changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index c3bb18afe6d7..15f00dee6368 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -16217,11 +16217,13 @@ int intel_modeset_init(struct drm_device
> *dev)
>  		      INTEL_NUM_PIPES(dev_priv),
>  		      INTEL_NUM_PIPES(dev_priv) > 1 ? "s" : "");
>  
> -	for_each_pipe(dev_priv, pipe) {
> -		ret = intel_crtc_init(dev_priv, pipe);
> -		if (ret) {
> -			drm_mode_config_cleanup(dev);
> -			return ret;
> +	if (HAS_DISPLAY(dev_priv) && INTEL_DISPLAY_ENABLED(dev_priv)) {
> +		for_each_pipe(dev_priv, pipe) {
> +			ret = intel_crtc_init(dev_priv, pipe);
> +			if (ret) {
> +				drm_mode_config_cleanup(dev);
> +				return ret;
> +			}

The CI warning are coming from this change, there is more thing to do
before not initialize the CRTCS.

>  		}
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c
> b/drivers/gpu/drm/i915/intel_device_info.c
> index 50b05a5de53b..5d2da7e68a60 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -894,12 +894,8 @@ void intel_device_info_runtime_init(struct
> drm_i915_private *dev_priv)
>  			runtime->num_sprites[pipe] = 1;
>  	}
>  
> -	if (i915_modparams.disable_display) {
> -		DRM_INFO("Display disabled (module parameter)\n");
> -		info->pipe_mask = 0;
> -	} else if (HAS_DISPLAY(dev_priv) &&
> -		   (IS_GEN_RANGE(dev_priv, 7, 8)) &&
> -		   HAS_PCH_SPLIT(dev_priv)) {
> +	if (HAS_DISPLAY(dev_priv) && IS_GEN_RANGE(dev_priv, 7, 8) &&
> +	    HAS_PCH_SPLIT(dev_priv)) {

This block looks right.

>  		u32 fuse_strap = I915_READ(FUSE_STRAP);
>  		u32 sfuse_strap = I915_READ(SFUSE_STRAP);
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-04 23:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 18:08 [PATCH 0/4] drm/i915: deconflate display disable from no display Jani Nikula
2019-09-02 18:08 ` [PATCH 1/4] drm/i915: add INTEL_NUM_PIPES() and use it Jani Nikula
2019-09-04 23:35   ` Souza, Jose
2019-09-02 18:08 ` [PATCH 2/4] drm/i915: convert device info num_pipes to pipe_mask Jani Nikula
2019-09-04 23:35   ` Souza, Jose
2019-09-02 18:08 ` [PATCH 3/4] drm/i915: introduce INTEL_DISPLAY_ENABLED() Jani Nikula
2019-09-05  0:00   ` Souza, Jose
2019-09-02 18:08 ` [PATCH 4/4] drm/i915: stop conflating HAS_DISPLAY() and disabled display Jani Nikula
2019-09-04 23:57   ` Souza, Jose [this message]
2019-09-02 18:13 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: deconflate display disable from no display Patchwork
2019-09-02 18:37 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-09-05 12:28 ` [PATCH 0/4] " Ville Syrjälä

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=8c187aebde419b746a1f8f42548aec2fa4e90223.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.