[Intel-gfx] [RFC 1/4] drm/i915: Define a common data structure for Panel Info
Jani Nikula
jani.nikula at intel.com
Mon Jan 5 07:44:06 PST 2015
On Mon, 05 Jan 2015, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Fri, Dec 26, 2014 at 03:53:27PM +0530, Shobhit Kumar wrote:
>> As of now this includes only PPS and BLC delays. New things can be added
>> as and when needed
>>
>> Signed-off-by: Shobhit Kumar <shobhit.kumar at intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_drv.h | 11 +++++++++++
>> drivers/gpu/drm/i915/intel_dsi.h | 7 +------
>> drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 10 +++++-----
>> 3 files changed, 17 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
>> index 588b618..0088f16 100644
>> --- a/drivers/gpu/drm/i915/intel_drv.h
>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>> @@ -731,6 +731,17 @@ struct intel_load_detect_pipe {
>> int dpms_mode;
>> };
>>
>> +struct panel_info {
>
> intel_panel_info please.
> -Daniel
>
>> + /* all delays in ms */
>> + u16 backlight_off_delay;
>> + u16 backlight_on_delay;
>> + u16 panel_on_delay;
>> + u16 panel_off_delay;
>> + u16 panel_pwr_cycle_delay;
struct intel_dp already has
int panel_power_up_delay;
int panel_power_down_delay;
int panel_power_cycle_delay;
int backlight_on_delay;
int backlight_off_delay;
so I think it would be good to abstract the delays into a separate
struct with these names.
BR,
Jani.
>> +
>> + /* Other panel specififc stuff */
>> +};
>> +
>> static inline struct intel_encoder *
>> intel_attached_encoder(struct drm_connector *connector)
>> {
>> diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
>> index 8fe2064..8b20f76 100644
>> --- a/drivers/gpu/drm/i915/intel_dsi.h
>> +++ b/drivers/gpu/drm/i915/intel_dsi.h
>> @@ -129,12 +129,7 @@ struct intel_dsi {
>> u32 pclk;
>> u16 burst_mode_ratio;
>>
>> - /* all delays in ms */
>> - u16 backlight_off_delay;
>> - u16 backlight_on_delay;
>> - u16 panel_on_delay;
>> - u16 panel_off_delay;
>> - u16 panel_pwr_cycle_delay;
>> + struct panel_info pinfo;
>> };
>>
>> /* XXX: Transitional before dual port configuration */
>> diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> index 5493aef..56b5b80 100644
>> --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c
>> @@ -550,11 +550,11 @@ static bool generic_init(struct intel_dsi_device *dsi)
>> /* delays in VBT are in unit of 100us, so need to convert
>> * here in ms
>> * Delay (100us) * 100 /1000 = Delay / 10 (ms) */
>> - intel_dsi->backlight_off_delay = pps->bl_disable_delay / 10;
>> - intel_dsi->backlight_on_delay = pps->bl_enable_delay / 10;
>> - intel_dsi->panel_on_delay = pps->panel_on_delay / 10;
>> - intel_dsi->panel_off_delay = pps->panel_off_delay / 10;
>> - intel_dsi->panel_pwr_cycle_delay = pps->panel_power_cycle_delay / 10;
>> + intel_dsi->pinfo.backlight_off_delay = pps->bl_disable_delay / 10;
>> + intel_dsi->pinfo.backlight_on_delay = pps->bl_enable_delay / 10;
>> + intel_dsi->pinfo.panel_on_delay = pps->panel_on_delay / 10;
>> + intel_dsi->pinfo.panel_off_delay = pps->panel_off_delay / 10;
>> + intel_dsi->pinfo.panel_pwr_cycle_delay = pps->panel_power_cycle_delay / 10;
>>
>> return true;
>> }
>> --
>> 1.9.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list