From: Jani Nikula <jani.nikula@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Cc: Rob Kramer <rob@solution-space.com>
Subject: Re: [PATCH 2/3] drm/i915: Replace the static panel_type variable with dev_priv->vbt.panel_type
Date: Fri, 08 Apr 2016 17:29:16 +0300 [thread overview]
Message-ID: <87egaguqbn.fsf@intel.com> (raw)
In-Reply-To: <1460122093-26497-2-git-send-email-ville.syrjala@linux.intel.com>
On Fri, 08 Apr 2016, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Store the extracted panel_type under dev_priv.vbt instead of keeping
> around a static variable for it.
>
> Cc: Rob Kramer <rob@solution-space.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Yes please.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/intel_bios.c | 13 +++++++++----
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 4ebd3ff02803..53ace572b292 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1443,6 +1443,7 @@ struct intel_vbt_data {
> unsigned int lvds_use_ssc:1;
> unsigned int display_clock_mode:1;
> unsigned int fdi_rx_polarity_inverted:1;
> + unsigned int panel_type:4;
> int lvds_ssc_freq;
> unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 13bdd4316092..d9568be4b33b 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -58,8 +58,6 @@
> #define SLAVE_ADDR1 0x70
> #define SLAVE_ADDR2 0x72
>
> -static int panel_type;
> -
> /* Get BDB block size given a pointer to Block ID. */
> static u32 _get_blocksize(const u8 *block_base)
> {
> @@ -205,6 +203,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
> const struct lvds_dvo_timing *panel_dvo_timing;
> const struct lvds_fp_timing *fp_timing;
> struct drm_display_mode *panel_fixed_mode;
> + int panel_type;
> int drrs_mode;
>
> lvds_options = find_section(bdb, BDB_LVDS_OPTIONS);
> @@ -216,6 +215,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
> return;
>
> panel_type = lvds_options->panel_type;
> + dev_priv->vbt.panel_type = panel_type;
>
> drrs_mode = (lvds_options->dps_panel_type_bits
> >> (panel_type * 2)) & MODE_MASK;
> @@ -251,7 +251,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>
> panel_dvo_timing = get_lvds_dvo_timing(lvds_lfp_data,
> lvds_lfp_data_ptrs,
> - lvds_options->panel_type);
> + panel_type);
>
> panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
> if (!panel_fixed_mode)
> @@ -266,7 +266,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>
> fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
> lvds_lfp_data_ptrs,
> - lvds_options->panel_type);
> + panel_type);
> if (fp_timing) {
> /* check the resolution, just to be sure */
> if (fp_timing->x_res == panel_fixed_mode->hdisplay &&
> @@ -284,6 +284,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> {
> const struct bdb_lfp_backlight_data *backlight_data;
> const struct bdb_lfp_backlight_data_entry *entry;
> + int panel_type = dev_priv->vbt.panel_type;
>
> backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
> if (!backlight_data)
> @@ -546,6 +547,7 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
> const struct bdb_edp *edp;
> const struct edp_power_seq *edp_pps;
> const struct edp_link_params *edp_link_params;
> + int panel_type = dev_priv->vbt.panel_type;
>
> edp = find_section(bdb, BDB_EDP);
> if (!edp) {
> @@ -657,6 +659,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
> {
> const struct bdb_psr *psr;
> const struct psr_table *psr_table;
> + int panel_type = dev_priv->vbt.panel_type;
>
> psr = find_section(bdb, BDB_PSR);
> if (!psr) {
> @@ -703,6 +706,7 @@ parse_mipi_config(struct drm_i915_private *dev_priv,
> const struct bdb_mipi_config *start;
> const struct mipi_config *config;
> const struct mipi_pps_data *pps;
> + int panel_type = dev_priv->vbt.panel_type;
>
> /* parse MIPI blocks only if LFP type is MIPI */
> if (!intel_bios_is_dsi_present(dev_priv, NULL))
> @@ -910,6 +914,7 @@ static void
> parse_mipi_sequence(struct drm_i915_private *dev_priv,
> const struct bdb_header *bdb)
> {
> + int panel_type = dev_priv->vbt.panel_type;
> const struct bdb_mipi_sequence *sequence;
> const u8 *seq_data;
> u32 seq_size;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-08 14:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 13:28 [PATCH 1/3] drm/i915: Reject panel_type > 0xf from VBT ville.syrjala
2016-04-08 13:28 ` [PATCH 2/3] drm/i915: Replace the static panel_type variable with dev_priv->vbt.panel_type ville.syrjala
2016-04-08 14:29 ` Jani Nikula [this message]
2016-04-08 13:28 ` [PATCH 3/3] drm/i915: Get panel_type from OpRegion panel details ville.syrjala
2016-04-08 14:50 ` Jani Nikula
2016-04-08 14:59 ` Ville Syrjälä
2016-04-08 15:01 ` Jani Nikula
2016-04-08 15:46 ` Ville Syrjälä
2016-04-11 7:23 ` [PATCH v2 " ville.syrjala
2016-04-11 8:09 ` Jani Nikula
2016-04-12 12:18 ` Ville Syrjälä
2016-04-08 13:56 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Reject panel_type > 0xf from VBT Patchwork
2016-04-08 14:07 ` Ville Syrjälä
2016-04-08 14:26 ` [PATCH 1/3] " Jani Nikula
2016-04-11 7:22 ` [PATCH v2 " ville.syrjala
2016-04-11 8:08 ` Jani Nikula
2016-04-11 7:56 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/3] drm/i915: Reject panel_type > 0xf from VBT (rev3) 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=87egaguqbn.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rob@solution-space.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox