[Intel-gfx] [PATCH 5/5] drm/i915/opregion: debug log about Mailbox #2 for backlight

Jani Nikula jani.nikula at intel.com
Thu Feb 10 16:17:30 UTC 2022


On Thu, 10 Feb 2022, Ville Syrjälä <ville.syrjala at 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 at linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula at 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 at 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

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list