From: Jani Nikula <jani.nikula@intel.com>
To: "Lee, Shawn C" <shawn.c.lee@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Cooper Chiou <cooper.chiou@intel.com>, Lee@freedesktop.org
Subject: Re: [PATCH] drm/i915: Backlight control via VESA eDP aux interface
Date: Mon, 10 Jun 2019 12:51:58 +0300 [thread overview]
Message-ID: <875zpdzs1t.fsf@intel.com> (raw)
In-Reply-To: <878su9zs7i.fsf@intel.com>
On Mon, 10 Jun 2019, Jani Nikula <jani.nikula@intel.com> wrote:
> On Mon, 10 Jun 2019, "Lee, Shawn C" <shawn.c.lee@intel.com> wrote:
>> The latest VBT support backlight control via aux. We have to
>> check VBT's setting before doing backlight initialization.
>> Then Driver will assign correct callback function for eDP
>> backlight control.
>>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Cc: Jose Roberto de Souza <jose.souza@intel.com>
>> Cc: Cooper Chiou <cooper.chiou@intel.com>
>>
>> Signed-off-by: Lee, Shawn C <shawn.c.lee@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_bios.c | 3 ++-
>> drivers/gpu/drm/i915/intel_vbt_defs.h | 6 ++++--
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index 1c037dfa83f5..27bda45520ec 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -317,7 +317,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
>>
>> entry = &backlight_data->data[panel_type];
>>
>> - dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_PWM;
>> + dev_priv->vbt.backlight.present = (entry->type == BDB_BACKLIGHT_TYPE_PWM_SOC ||
>> + entry->type == BDB_BACKLIGHT_TYPE_PWM_VESA_EDP_AUX);
>> if (!dev_priv->vbt.backlight.present) {
>> DRM_DEBUG_KMS("PWM backlight not present in VBT (type %u)\n",
>> entry->type);
>> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
>> index 89ef14cafb6b..710f539f17de 100644
>> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
>> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
>> @@ -760,8 +760,10 @@ struct bdb_lvds_lfp_data {
>> * Block 43 - LFP Backlight Control Data Block
>> */
>>
>> -#define BDB_BACKLIGHT_TYPE_NONE 0
>> -#define BDB_BACKLIGHT_TYPE_PWM 2
>> +#define BDB_BACKLIGHT_TYPE_NONE 0
>> +#define BDB_BACKLIGHT_TYPE_PWM_SOC 2
>> +#define BDB_BACKLIGHT_TYPE_PWM_PANEL_DRIVER_OLED 4
>> +#define BDB_BACKLIGHT_TYPE_PWM_VESA_EDP_AUX 5
>
> entry->type is two bits, 0-1 in the Features byte of the Backlight Data
> Structure in the spec. BDB_BACKLIGHT_TYPE_PWM_VESA_EDP_AUX will never
> match, so this was also never tested. There are no updates to the VBT
> spec to reflect the above change (and if I saw one, I'd reject it as
> backward incompatible).
>
> Please don't tell me you have some product specific spec and VBT there,
> because it's not flying upstream.
>
> The brightness control method structure does have a more detailed way of
> describing the method, and it probably already covers what you need.
Indeed you probably want to look at dev_priv->vbt.backlight.type and how
it's assigned, as well as update enum intel_backlight_type.
BR,
Jani.
>
> BR,
> Jani.
>
>
>>
>> struct lfp_backlight_data_entry {
>> u8 type:2;
--
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:[~2019-06-10 9:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 8:40 [PATCH] drm/i915: Backlight control via VESA eDP aux interface Lee, Shawn C
2019-06-10 9:48 ` Jani Nikula
2019-06-10 9:51 ` Jani Nikula [this message]
2019-06-10 12:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-06-11 3:07 ` ✓ 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=875zpdzs1t.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=Lee@freedesktop.org \
--cc=cooper.chiou@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=shawn.c.lee@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.