All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RESEND] drm/i915: stop conflating HAS_DISPLAY() and disabled display
Date: Mon, 16 Sep 2019 17:27:40 +0300	[thread overview]
Message-ID: <20190916142740.GG1208@intel.com> (raw)
In-Reply-To: <87impsxrop.fsf@intel.com>

On Mon, Sep 16, 2019 at 05:05:10PM +0300, Jani Nikula wrote:
> On Mon, 16 Sep 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Quoting Jani Nikula (2019-09-16 10:29:01)
> >> 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 e75945a53e06..ac24f96582ca 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> >> @@ -16281,11 +16281,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);
> >
> > What direction are you planning to take, avoid enabling anything related
> > to display? My worry is that in
> >
> > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14418/fi-bsw-kefka/igt@i915_selftest@live_gt_timelines.html
> >
> > we still see weird events like
> >
> > <7> [444.313823] [drm:i915_redisable_vga_power_on [i915]] Something enabled VGA plane, disabling it
> >
> > and I'm not sure how you intend to curtail that. (Or if that's even
> > possible.)
> 
> The main goal here (in this specific patch) is to decouple disabled but
> existing display from non-existing display. That lets us develop the two
> cases independently, and I acknowledge I may have been simple minded
> enough at some point to believe they could be put in the same bucket.

What's the actual use case for the "disabled but existing display"?

So far I've thought that the only use case is regression testing
of the "hw has no display" case on hw which in fact has a display.
If we have separate codepaths we can't do that effectively. At
which point we might as well get rid of the "disable display"
capability entirely.

But maybe I'm missing something...

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-16 14:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  9:29 [RESEND] drm/i915: stop conflating HAS_DISPLAY() and disabled display Jani Nikula
2019-09-16 10:29 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-09-16 12:46 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-16 13:27 ` [RESEND] " Chris Wilson
2019-09-16 14:05   ` Jani Nikula
2019-09-16 14:27     ` Ville Syrjälä [this message]
2019-09-16 14:33       ` Chris Wilson
2019-09-16 18:22       ` Jani Nikula
2019-09-16 14:16 ` Chris Wilson

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=20190916142740.GG1208@intel.com \
    --to=ville.syrjala@linux.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.