Message ID | 42fd9cd777c5cc9a8d48db9dd8306924c735918e.1644489329.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/opregion: fixes and cleanups, RESEND | expand |
On Thu, Feb 10, 2022 at 12:36:46PM +0200, Jani Nikula wrote: > Start debug logging about the presence of the new Mailbox #2 for > backlight. Actual support is to be added later. > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/display/intel_opregion.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c > index 6e32ed6bbf4e..b1ad11b2ebb3 100644 > --- a/drivers/gpu/drm/i915/display/intel_opregion.c > +++ b/drivers/gpu/drm/i915/display/intel_opregion.c > @@ -47,10 +47,11 @@ > #define OPREGION_ASLE_EXT_OFFSET 0x1C00 > > #define OPREGION_SIGNATURE "IntelGraphicsMem" > -#define MBOX_ACPI (1<<0) > -#define MBOX_SWSCI (1<<1) > -#define MBOX_ASLE (1<<2) > -#define MBOX_ASLE_EXT (1<<4) > +#define MBOX_ACPI BIT(0) /* Mailbox #1 */ > +#define MBOX_SWSCI BIT(1) /* Mailbox #2 (obsolete from v2.x) */ > +#define MBOX_ASLE BIT(2) /* Mailbox #3 */ > +#define MBOX_ASLE_EXT BIT(4) /* Mailbox #5 */ > +#define MBOX_BACKLIGHT BIT(5) /* Mailbox #2 (valid from v3.x) */ Opregion is such a lovely turd. Series is Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > struct opregion_header { > u8 signature[16]; > @@ -957,6 +958,10 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) > opregion->asle_ext = base + OPREGION_ASLE_EXT_OFFSET; > } > > + if (mboxes & MBOX_BACKLIGHT) { > + drm_dbg(&dev_priv->drm, "Mailbox #2 for backlight present\n"); > + } > + > if (intel_load_vbt_firmware(dev_priv) == 0) > goto out; > > -- > 2.30.2
On Thu, 10 Feb 2022, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > On Thu, Feb 10, 2022 at 12:36:46PM +0200, Jani Nikula wrote: >> Start debug logging about the presence of the new Mailbox #2 for >> backlight. Actual support is to be added later. >> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> --- >> drivers/gpu/drm/i915/display/intel_opregion.c | 13 +++++++++---- >> 1 file changed, 9 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c >> index 6e32ed6bbf4e..b1ad11b2ebb3 100644 >> --- a/drivers/gpu/drm/i915/display/intel_opregion.c >> +++ b/drivers/gpu/drm/i915/display/intel_opregion.c >> @@ -47,10 +47,11 @@ >> #define OPREGION_ASLE_EXT_OFFSET 0x1C00 >> >> #define OPREGION_SIGNATURE "IntelGraphicsMem" >> -#define MBOX_ACPI (1<<0) >> -#define MBOX_SWSCI (1<<1) >> -#define MBOX_ASLE (1<<2) >> -#define MBOX_ASLE_EXT (1<<4) >> +#define MBOX_ACPI BIT(0) /* Mailbox #1 */ >> +#define MBOX_SWSCI BIT(1) /* Mailbox #2 (obsolete from v2.x) */ >> +#define MBOX_ASLE BIT(2) /* Mailbox #3 */ >> +#define MBOX_ASLE_EXT BIT(4) /* Mailbox #5 */ >> +#define MBOX_BACKLIGHT BIT(5) /* Mailbox #2 (valid from v3.x) */ > > Opregion is such a lovely turd. Tell me about it. I had to send v2 of patch 4/5 demoting the warn to dbg because CI apparently has swsci mbox & version combos that supposedly shouldn't exist. *sigh*. > Series is > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Thanks, Jani. > >> >> struct opregion_header { >> u8 signature[16]; >> @@ -957,6 +958,10 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) >> opregion->asle_ext = base + OPREGION_ASLE_EXT_OFFSET; >> } >> >> + if (mboxes & MBOX_BACKLIGHT) { >> + drm_dbg(&dev_priv->drm, "Mailbox #2 for backlight present\n"); >> + } >> + >> if (intel_load_vbt_firmware(dev_priv) == 0) >> goto out; >> >> -- >> 2.30.2
diff --git a/drivers/gpu/drm/i915/display/intel_opregion.c b/drivers/gpu/drm/i915/display/intel_opregion.c index 6e32ed6bbf4e..b1ad11b2ebb3 100644 --- a/drivers/gpu/drm/i915/display/intel_opregion.c +++ b/drivers/gpu/drm/i915/display/intel_opregion.c @@ -47,10 +47,11 @@ #define OPREGION_ASLE_EXT_OFFSET 0x1C00 #define OPREGION_SIGNATURE "IntelGraphicsMem" -#define MBOX_ACPI (1<<0) -#define MBOX_SWSCI (1<<1) -#define MBOX_ASLE (1<<2) -#define MBOX_ASLE_EXT (1<<4) +#define MBOX_ACPI BIT(0) /* Mailbox #1 */ +#define MBOX_SWSCI BIT(1) /* Mailbox #2 (obsolete from v2.x) */ +#define MBOX_ASLE BIT(2) /* Mailbox #3 */ +#define MBOX_ASLE_EXT BIT(4) /* Mailbox #5 */ +#define MBOX_BACKLIGHT BIT(5) /* Mailbox #2 (valid from v3.x) */ struct opregion_header { u8 signature[16]; @@ -957,6 +958,10 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv) opregion->asle_ext = base + OPREGION_ASLE_EXT_OFFSET; } + if (mboxes & MBOX_BACKLIGHT) { + drm_dbg(&dev_priv->drm, "Mailbox #2 for backlight present\n"); + } + if (intel_load_vbt_firmware(dev_priv) == 0) goto out;
Start debug logging about the presence of the new Mailbox #2 for backlight. Actual support is to be added later. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/display/intel_opregion.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)