From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/3] drm/i915: disable all display features when no display
Date: Fri, 11 Sep 2020 14:02:51 +0300 [thread overview]
Message-ID: <87zh5wzick.fsf@intel.com> (raw)
In-Reply-To: <20200910104421.GT6112@intel.com>
On Thu, 10 Sep 2020, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Sep 10, 2020 at 12:52:25PM +0300, Jani Nikula wrote:
>> Disable all display feature flags when there are no pipes i.e. there is
>> no display. This should help with not having to additionally check for
>> HAS_DISPLAY() when a feature flag check would suffice.
>>
>> Also disable modeset and atomic driver features.
>
> While bspec is rather vague whether this is actually entirely consistent
> with how th hw works, it seems rather silly if any display hw blocks
> would get initialized by the BIOS/whatever when there are no usable
> pipes.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Pushed the lot, thanks for the reviews.
BR,
Jani.
>
>>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_device_info.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
>> index e2aa5bc3a6e0..adc836f15fde 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>> @@ -516,6 +516,14 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>> S32_MAX),
>> USEC_PER_SEC));
>> }
>> +
>> + if (!HAS_DISPLAY(dev_priv)) {
>> + dev_priv->drm.driver_features &= ~(DRIVER_MODESET |
>> + DRIVER_ATOMIC);
>> + memset(&info->display, 0, sizeof(info->display));
>> + memset(runtime->num_sprites, 0, sizeof(runtime->num_sprites));
>> + memset(runtime->num_scalers, 0, sizeof(runtime->num_scalers));
>
> Side note: No idea why the num_scalers/sprites is stored under the
> runtime info. I think those could just live in the normal PCI ID
> based device info.
>
>> + }
>> }
>>
>> void intel_driver_caps_print(const struct intel_driver_caps *caps,
>> --
>> 2.20.1
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-09-11 11:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 9:52 [Intel-gfx] [PATCH 1/3] drm/i915: disable all display features when no display Jani Nikula
2020-09-10 9:52 ` [Intel-gfx] [PATCH 2/3] drm/i915: move gen4 GCDGMBUS save/restore to display save/restore Jani Nikula
2020-09-10 10:46 ` Ville Syrjälä
2020-09-10 9:52 ` [Intel-gfx] [PATCH 3/3] drm/i915: move gmbus restore to i915_restore_display Jani Nikula
2020-09-10 10:50 ` Ville Syrjälä
2020-09-10 10:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: disable all display features when no display Patchwork
2020-09-10 10:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-10 10:44 ` [Intel-gfx] [PATCH 1/3] " Ville Syrjälä
2020-09-11 11:02 ` Jani Nikula [this message]
2020-09-10 11:27 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/3] " Patchwork
2020-09-10 14:51 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: disable all display features when no display (rev2) Patchwork
2020-09-10 15:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-10 16:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87zh5wzick.fsf@intel.com \
--to=jani.nikula@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 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.