* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-02-25 9:57 Shubhangi Shrivastava
2016-02-25 9:57 ` [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT Shubhangi Shrivastava
2016-02-25 11:34 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Update VBT fields for child devices Patchwork
0 siblings, 2 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-02-25 9:57 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..2898323 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,8 +258,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT
2016-02-25 9:57 [PATCH 1/2] drm/i915: Update VBT fields for child devices Shubhangi Shrivastava
@ 2016-02-25 9:57 ` Shubhangi Shrivastava
2016-02-25 13:57 ` Ville Syrjälä
2016-02-25 11:34 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Update VBT fields for child devices Patchwork
1 sibling, 1 reply; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-02-25 9:57 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch sets the invert bit for hpd detection for each port
based on VBT configuration. Since each AOB can be designed to
depend on invert bit or not, it is expected if an AOB requires
invert bit, the user will set respective bit in VBT.
v2: Separated VBT parsing from the rest of the logic. (Jani)
v3: Moved setting invert bit logic to bxt_hpd_irq_setup()
and changed its logic to avoid looping twice. (Ville)
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_irq.c | 22 +++++++++++++++++++-
drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++
drivers/gpu/drm/i915/intel_bios.c | 42 +++++++++++++++++++++++++++++++++++++++
4 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8216665..457f175 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3393,6 +3393,7 @@ extern void intel_i2c_reset(struct drm_device *dev);
/* intel_bios.c */
int intel_bios_init(struct drm_i915_private *dev_priv);
bool intel_bios_is_valid_vbt(const void *buf, size_t size);
+bool intel_bios_is_port_hpd_inverted(struct drm_device *dev, enum port port);
/* intel_opregion.c */
#ifdef CONFIG_ACPI
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 25a8937..525da56 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -36,6 +36,7 @@
#include "i915_drv.h"
#include "i915_trace.h"
#include "intel_drv.h"
+#include "intel_bios.h"
/**
* DOC: interrupt handling
@@ -3484,6 +3485,7 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u32 hotplug_irqs, hotplug, enabled_irqs;
+ int val = 0;
enabled_irqs = intel_hpd_enabled_irqs(dev, hpd_bxt);
hotplug_irqs = BXT_DE_PORT_HOTPLUG_MASK;
@@ -3493,7 +3495,25 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)
hotplug = I915_READ(PCH_PORT_HOTPLUG);
hotplug |= PORTC_HOTPLUG_ENABLE | PORTB_HOTPLUG_ENABLE |
PORTA_HOTPLUG_ENABLE;
- I915_WRITE(PCH_PORT_HOTPLUG, hotplug);
+
+ /*
+ * For BXT invert bit has to be set based on AOB design
+ * for HPD detection logic, update it based on VBT fields.
+ */
+ if ((enabled_irqs & BXT_DE_PORT_HP_DDIA)
+ && intel_bios_is_port_hpd_inverted(dev, PORT_A))
+ val |= BXT_DDIA_HPD_INVERT;
+ if ((enabled_irqs & BXT_DE_PORT_HP_DDIB)
+ && intel_bios_is_port_hpd_inverted(dev, PORT_B))
+ val |= BXT_DDIB_HPD_INVERT;
+ if ((enabled_irqs & BXT_DE_PORT_HP_DDIC)
+ && intel_bios_is_port_hpd_inverted(dev, PORT_C))
+ val |= BXT_DDIC_HPD_INVERT;
+
+ DRM_DEBUG_KMS("Invert bit setting: hp_ctl:%x hp_port:%x val:%x\n",
+ hotplug, enabled_irqs, val);
+ hotplug &= ~BXT_DDI_HPD_INVERT_MASK;
+ I915_WRITE(PCH_PORT_HOTPLUG, hotplug | val);
}
static void ibx_irq_postinstall(struct drm_device *dev)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6732fc1..9ed42bb 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -5940,6 +5940,14 @@ enum skl_disp_power_wells {
#define GEN8_PCU_IIR _MMIO(0x444e8)
#define GEN8_PCU_IER _MMIO(0x444ec)
+/* BXT hotplug control */
+#define BXT_DDIA_HPD_INVERT (1 << 27)
+#define BXT_DDIC_HPD_INVERT (1 << 11)
+#define BXT_DDIB_HPD_INVERT (1 << 3)
+#define BXT_DDI_HPD_INVERT_MASK (BXT_DDIA_HPD_INVERT | \
+ BXT_DDIB_HPD_INVERT | \
+ BXT_DDIC_HPD_INVERT)
+
#define ILK_DISPLAY_CHICKEN2 _MMIO(0x42004)
/* Required on all Ironlake and Sandybridge according to the B-Spec. */
#define ILK_ELPIN_409_SELECT (1 << 25)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index a26d4b4..24d0077 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -105,6 +105,48 @@ find_section(const void *_bdb, int section_id)
return NULL;
}
+bool
+intel_bios_is_port_hpd_inverted(struct drm_device *dev, enum port port)
+{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ int i;
+
+ if (!IS_BROXTON(dev)) {
+ DRM_ERROR("Bit inversion is not required in this platform\n");
+ return false;
+ }
+
+ for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
+
+ if (dev_priv->vbt.child_dev[i].common.hpd_invert == 1) {
+
+ switch (dev_priv->vbt.child_dev[i].common.dvo_port) {
+ case DVO_PORT_DPA:
+ case DVO_PORT_HDMIA:
+ if (port == PORT_A)
+ return true;
+ break;
+ case DVO_PORT_DPB:
+ case DVO_PORT_HDMIB:
+ if (port == PORT_B)
+ return true;
+ break;
+ case DVO_PORT_DPC:
+ case DVO_PORT_HDMIC:
+ if (port == PORT_C)
+ return true;
+ break;
+ default:
+ DRM_DEBUG_KMS("This dvo port %d doesn't need invert\n",
+ dev_priv->vbt.child_dev[i].common.dvo_port);
+ break;
+ }
+ }
+ }
+
+ return false;
+}
+
static void
fill_detail_timing_data(struct drm_display_mode *panel_fixed_mode,
const struct lvds_dvo_timing *dvo_timing)
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT
2016-02-25 9:57 ` [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT Shubhangi Shrivastava
@ 2016-02-25 13:57 ` Ville Syrjälä
0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2016-02-25 13:57 UTC (permalink / raw)
To: Shubhangi Shrivastava; +Cc: intel-gfx
On Thu, Feb 25, 2016 at 03:27:26PM +0530, Shubhangi Shrivastava wrote:
> This patch sets the invert bit for hpd detection for each port
> based on VBT configuration. Since each AOB can be designed to
> depend on invert bit or not, it is expected if an AOB requires
> invert bit, the user will set respective bit in VBT.
>
> v2: Separated VBT parsing from the rest of the logic. (Jani)
>
> v3: Moved setting invert bit logic to bxt_hpd_irq_setup()
> and changed its logic to avoid looping twice. (Ville)
>
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_irq.c | 22 +++++++++++++++++++-
> drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++
> drivers/gpu/drm/i915/intel_bios.c | 42 +++++++++++++++++++++++++++++++++++++++
> 4 files changed, 72 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 8216665..457f175 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -3393,6 +3393,7 @@ extern void intel_i2c_reset(struct drm_device *dev);
> /* intel_bios.c */
> int intel_bios_init(struct drm_i915_private *dev_priv);
> bool intel_bios_is_valid_vbt(const void *buf, size_t size);
> +bool intel_bios_is_port_hpd_inverted(struct drm_device *dev, enum port port);
>
> /* intel_opregion.c */
> #ifdef CONFIG_ACPI
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 25a8937..525da56 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -36,6 +36,7 @@
> #include "i915_drv.h"
> #include "i915_trace.h"
> #include "intel_drv.h"
> +#include "intel_bios.h"
>
> /**
> * DOC: interrupt handling
> @@ -3484,6 +3485,7 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> u32 hotplug_irqs, hotplug, enabled_irqs;
> + int val = 0;
u32
or if you change the logic below to mask out the bits first and then set
them as needed, then you wouldn't need another temporary variable.
>
> enabled_irqs = intel_hpd_enabled_irqs(dev, hpd_bxt);
> hotplug_irqs = BXT_DE_PORT_HOTPLUG_MASK;
> @@ -3493,7 +3495,25 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)
> hotplug = I915_READ(PCH_PORT_HOTPLUG);
> hotplug |= PORTC_HOTPLUG_ENABLE | PORTB_HOTPLUG_ENABLE |
> PORTA_HOTPLUG_ENABLE;
> - I915_WRITE(PCH_PORT_HOTPLUG, hotplug);
> +
> + /*
> + * For BXT invert bit has to be set based on AOB design
> + * for HPD detection logic, update it based on VBT fields.
> + */
> + if ((enabled_irqs & BXT_DE_PORT_HP_DDIA)
> + && intel_bios_is_port_hpd_inverted(dev, PORT_A))
&& usually goes on the previous line, and indentation should be so that
the things line up after the opening '('.
> + val |= BXT_DDIA_HPD_INVERT;
> + if ((enabled_irqs & BXT_DE_PORT_HP_DDIB)
> + && intel_bios_is_port_hpd_inverted(dev, PORT_B))
> + val |= BXT_DDIB_HPD_INVERT;
> + if ((enabled_irqs & BXT_DE_PORT_HP_DDIC)
> + && intel_bios_is_port_hpd_inverted(dev, PORT_C))
> + val |= BXT_DDIC_HPD_INVERT;
> +
> + DRM_DEBUG_KMS("Invert bit setting: hp_ctl:%x hp_port:%x val:%x\n",
> + hotplug, enabled_irqs, val);
> + hotplug &= ~BXT_DDI_HPD_INVERT_MASK;
> + I915_WRITE(PCH_PORT_HOTPLUG, hotplug | val);
> }
>
> static void ibx_irq_postinstall(struct drm_device *dev)
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 6732fc1..9ed42bb 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5940,6 +5940,14 @@ enum skl_disp_power_wells {
> #define GEN8_PCU_IIR _MMIO(0x444e8)
> #define GEN8_PCU_IER _MMIO(0x444ec)
>
> +/* BXT hotplug control */
> +#define BXT_DDIA_HPD_INVERT (1 << 27)
> +#define BXT_DDIC_HPD_INVERT (1 << 11)
> +#define BXT_DDIB_HPD_INVERT (1 << 3)
> +#define BXT_DDI_HPD_INVERT_MASK (BXT_DDIA_HPD_INVERT | \
> + BXT_DDIB_HPD_INVERT | \
> + BXT_DDIC_HPD_INVERT)
These should be moved to where the other bits for this register are.
> +
> #define ILK_DISPLAY_CHICKEN2 _MMIO(0x42004)
> /* Required on all Ironlake and Sandybridge according to the B-Spec. */
> #define ILK_ELPIN_409_SELECT (1 << 25)
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index a26d4b4..24d0077 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -105,6 +105,48 @@ find_section(const void *_bdb, int section_id)
> return NULL;
> }
>
> +bool
> +intel_bios_is_port_hpd_inverted(struct drm_device *dev, enum port port)
> +{
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + int i;
> +
> + if (!IS_BROXTON(dev)) {
> + DRM_ERROR("Bit inversion is not required in this platform\n");
> + return false;
> + }
> +
> + for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
> +
> + if (dev_priv->vbt.child_dev[i].common.hpd_invert == 1) {
> +
> + switch (dev_priv->vbt.child_dev[i].common.dvo_port) {
> + case DVO_PORT_DPA:
> + case DVO_PORT_HDMIA:
> + if (port == PORT_A)
> + return true;
> + break;
> + case DVO_PORT_DPB:
> + case DVO_PORT_HDMIB:
> + if (port == PORT_B)
> + return true;
> + break;
> + case DVO_PORT_DPC:
> + case DVO_PORT_HDMIC:
> + if (port == PORT_C)
> + return true;
> + break;
> + default:
> + DRM_DEBUG_KMS("This dvo port %d doesn't need invert\n",
> + dev_priv->vbt.child_dev[i].common.dvo_port);
I still find this debug message confusing. In fact BXT only has ports
A,B,C, so if we end up here it would mean the VBT is broken or something,
no?
> + break;
> + }
> + }
> + }
> +
> + return false;
> +}
> +
> static void
> fill_detail_timing_data(struct drm_display_mode *panel_fixed_mode,
> const struct lvds_dvo_timing *dvo_timing)
> --
> 2.6.1
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Update VBT fields for child devices
2016-02-25 9:57 [PATCH 1/2] drm/i915: Update VBT fields for child devices Shubhangi Shrivastava
2016-02-25 9:57 ` [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT Shubhangi Shrivastava
@ 2016-02-25 11:34 ` Patchwork
1 sibling, 0 replies; 17+ messages in thread
From: Patchwork @ 2016-02-25 11:34 UTC (permalink / raw)
To: Shubhangi Shrivastava; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Update VBT fields for child devices
URL : https://patchwork.freedesktop.org/series/3785/
State : failure
== Summary ==
Series 3785v1 Series without cover letter
http://patchwork.freedesktop.org/api/1.0/series/3785/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (byt-nuc)
Test kms_force_connector_basic:
Subgroup force-connector-state:
pass -> SKIP (ivb-t430s)
Subgroup force-load-detect:
fail -> DMESG-FAIL (snb-dellxps)
fail -> DMESG-FAIL (ilk-hp8440p)
Subgroup prune-stale-modes:
pass -> SKIP (ivb-t430s)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (bsw-nuc-2)
bdw-ultra total:168 pass:154 dwarn:0 dfail:0 fail:0 skip:14
bsw-nuc-2 total:168 pass:135 dwarn:2 dfail:0 fail:1 skip:30
byt-nuc total:168 pass:142 dwarn:0 dfail:0 fail:1 skip:25
hsw-brixbox total:168 pass:154 dwarn:0 dfail:0 fail:0 skip:14
hsw-gt2 total:168 pass:157 dwarn:0 dfail:1 fail:0 skip:10
ilk-hp8440p total:168 pass:118 dwarn:0 dfail:1 fail:0 skip:49
ivb-t430s total:168 pass:151 dwarn:0 dfail:0 fail:1 skip:16
skl-i7k-2 total:168 pass:151 dwarn:1 dfail:0 fail:0 skip:16
snb-dellxps total:168 pass:145 dwarn:0 dfail:1 fail:0 skip:22
snb-x220t total:168 pass:145 dwarn:0 dfail:0 fail:2 skip:21
Results at /archive/results/CI_IGT_test/Patchwork_1474/
eb8b161ee8760105238ce372afa47b4565590125 drm-intel-nightly: 2016y-02m-25d-08h-16m-19s UTC integration manifest
68243399a1ea0df70e2a004e733927ac45ac355c drm/i915: Set invert bit for hpd based on VBT
8cb41eb42a5e8d8c010b8a1fd494b12e8d8c4042 drm/i915: Update VBT fields for child devices
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-31 10:41 Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-31 10:41 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_vbt_defs.h | 18 ++++++++++++------
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 083003b..e2f636c 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1126,7 +1126,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1244,6 +1244,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 749dcea..9ff1e96 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -261,9 +261,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -272,9 +269,18 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
- u8 not_common3[13];
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
+ u8 not_common3[12];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-25 17:55 Shubhangi Shrivastava
2016-03-30 14:48 ` Jani Nikula
0 siblings, 1 reply; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-25 17:55 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_vbt_defs.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 083003b..e2f636c 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1126,7 +1126,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1244,6 +1244,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 749dcea..2da7be8 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -261,9 +261,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -272,8 +269,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/i915: Update VBT fields for child devices
2016-03-25 17:55 Shubhangi Shrivastava
@ 2016-03-30 14:48 ` Jani Nikula
2016-03-31 10:42 ` Shubhangi Shrivastava
0 siblings, 1 reply; 17+ messages in thread
From: Jani Nikula @ 2016-03-30 14:48 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
On Fri, 25 Mar 2016, Shubhangi Shrivastava <shubhangi.shrivastava@intel.com> wrote:
> This patch adds new fields that are not yet added in drm code
> in child devices struct
>
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
> drivers/gpu/drm/i915/intel_vbt_defs.h | 16 +++++++++++-----
> 2 files changed, 25 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 083003b..e2f636c 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1126,7 +1126,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> }
>
> /* Parse the I_boost config for SKL and above */
> - if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
> + if (bdb->version >= 196 && child->common.iboost) {
> info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
> DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
> port_name(port), info->dp_boost_level);
> @@ -1244,6 +1244,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
> */
> memcpy(child_dev_ptr, p_child,
> min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
> +
> + /*
> + * copied full block, now init values when they are not
> + * available in current version
> + */
> + if (bdb->version < 196) {
> + /* Set default values for bits added from v196 */
> + child_dev_ptr->common.iboost = 0;
> + child_dev_ptr->common.hpd_invert = 0;
> + }
> +
> + if (bdb->version < 192)
> + child_dev_ptr->common.lspcon = 0;
> }
> return;
> }
> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
> index 749dcea..2da7be8 100644
> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
> @@ -261,9 +261,6 @@ struct old_child_dev_config {
> * versions. Notice that the meaning of the contents contents may still change,
> * but at least the offsets are consistent. */
>
> -/* Definitions for flags_1 */
> -#define IBOOST_ENABLE (1<<3)
> -
> struct common_child_dev_config {
> u16 handle;
> u16 device_type;
> @@ -272,8 +269,17 @@ struct common_child_dev_config {
> u8 not_common2[2];
> u8 ddc_pin;
> u16 edid_ptr;
> - u8 obsolete;
> - u8 flags_1;
> + u8 dvo_cfg; /* See DEVICE_CFG_* above */
> + u8 efp_routed:1;
> + u8 lane_reversal:1;
> + u8 lspcon:1;
> + u8 iboost:1;
> + u8 hpd_invert:1;
> + u8 flag_reserved:3;
> + u8 hdmi_support:1;
> + u8 dp_support:1;
> + u8 tmds_support:1;
> + u8 support_reserved:5;
You replace two bytes with three bytes, shifting the rest.
> u8 not_common3[13];
> u8 iboost_level;
> } __packed;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/i915: Update VBT fields for child devices
2016-03-30 14:48 ` Jani Nikula
@ 2016-03-31 10:42 ` Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-31 10:42 UTC (permalink / raw)
To: Jani Nikula, intel-gfx
On Wednesday 30 March 2016 08:18 PM, Jani Nikula wrote:
> On Fri, 25 Mar 2016, Shubhangi Shrivastava <shubhangi.shrivastava@intel.com> wrote:
>> This patch adds new fields that are not yet added in drm code
>> in child devices struct
>>
>> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
>> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
>> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
>> drivers/gpu/drm/i915/intel_vbt_defs.h | 16 +++++++++++-----
>> 2 files changed, 25 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index 083003b..e2f636c 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -1126,7 +1126,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>> }
>>
>> /* Parse the I_boost config for SKL and above */
>> - if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
>> + if (bdb->version >= 196 && child->common.iboost) {
>> info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
>> DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
>> port_name(port), info->dp_boost_level);
>> @@ -1244,6 +1244,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
>> */
>> memcpy(child_dev_ptr, p_child,
>> min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
>> +
>> + /*
>> + * copied full block, now init values when they are not
>> + * available in current version
>> + */
>> + if (bdb->version < 196) {
>> + /* Set default values for bits added from v196 */
>> + child_dev_ptr->common.iboost = 0;
>> + child_dev_ptr->common.hpd_invert = 0;
>> + }
>> +
>> + if (bdb->version < 192)
>> + child_dev_ptr->common.lspcon = 0;
>> }
>> return;
>> }
>> diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
>> index 749dcea..2da7be8 100644
>> --- a/drivers/gpu/drm/i915/intel_vbt_defs.h
>> +++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
>> @@ -261,9 +261,6 @@ struct old_child_dev_config {
>> * versions. Notice that the meaning of the contents contents may still change,
>> * but at least the offsets are consistent. */
>>
>> -/* Definitions for flags_1 */
>> -#define IBOOST_ENABLE (1<<3)
>> -
>> struct common_child_dev_config {
>> u16 handle;
>> u16 device_type;
>> @@ -272,8 +269,17 @@ struct common_child_dev_config {
>> u8 not_common2[2];
>> u8 ddc_pin;
>> u16 edid_ptr;
>> - u8 obsolete;
>> - u8 flags_1;
>> + u8 dvo_cfg; /* See DEVICE_CFG_* above */
>> + u8 efp_routed:1;
>> + u8 lane_reversal:1;
>> + u8 lspcon:1;
>> + u8 iboost:1;
>> + u8 hpd_invert:1;
>> + u8 flag_reserved:3;
>> + u8 hdmi_support:1;
>> + u8 dp_support:1;
>> + u8 tmds_support:1;
>> + u8 support_reserved:5;
> You replace two bytes with three bytes, shifting the rest.
Oh yes.. Thats a miss. Thanks.. Fixed..
>
>> u8 not_common3[13];
>> u8 iboost_level;
>> } __packed;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-24 12:10 Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-24 12:10 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_vbt_defs.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 083003b..e2f636c 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1126,7 +1126,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1244,6 +1244,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 749dcea..2da7be8 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -261,9 +261,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -272,8 +269,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-15 13:13 Shubhangi Shrivastava
2016-03-15 14:47 ` Ville Syrjälä
0 siblings, 1 reply; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-15 13:13 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..2898323 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,8 +258,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/i915: Update VBT fields for child devices
2016-03-15 13:13 Shubhangi Shrivastava
@ 2016-03-15 14:47 ` Ville Syrjälä
2016-03-22 16:36 ` Ville Syrjälä
0 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjälä @ 2016-03-15 14:47 UTC (permalink / raw)
To: Shubhangi Shrivastava; +Cc: intel-gfx
On Tue, Mar 15, 2016 at 06:43:53PM +0530, Shubhangi Shrivastava wrote:
> This patch adds new fields that are not yet added in drm code
> in child devices struct
>
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> ---
> drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
> drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
> 2 files changed, 25 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index bf62a19..a26d4b4 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> }
>
> /* Parse the I_boost config for SKL and above */
> - if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
> + if (bdb->version >= 196 && child->common.iboost) {
> info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
> DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
> port_name(port), info->dp_boost_level);
> @@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
> */
> memcpy(child_dev_ptr, p_child,
> min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
> +
> + /*
> + * copied full block, now init values when they are not
> + * available in current version
> + */
> + if (bdb->version < 196) {
> + /* Set default values for bits added from v196 */
> + child_dev_ptr->common.iboost = 0;
> + child_dev_ptr->common.hpd_invert = 0;
> + }
> +
> + if (bdb->version < 192)
> + child_dev_ptr->common.lspcon = 0;
> }
> return;
> }
> diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> index 350d4e0..2898323 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -250,9 +250,6 @@ struct old_child_dev_config {
> * versions. Notice that the meaning of the contents contents may still change,
> * but at least the offsets are consistent. */
>
> -/* Definitions for flags_1 */
> -#define IBOOST_ENABLE (1<<3)
> -
> struct common_child_dev_config {
> u16 handle;
> u16 device_type;
> @@ -261,8 +258,17 @@ struct common_child_dev_config {
> u8 not_common2[2];
> u8 ddc_pin;
> u16 edid_ptr;
> - u8 obsolete;
> - u8 flags_1;
> + u8 dvo_cfg; /* See DEVICE_CFG_* above */
> + u8 efp_routed:1;
> + u8 lane_reversal:1;
> + u8 lspcon:1;
> + u8 iboost:1;
> + u8 hpd_invert:1;
> + u8 flag_reserved:3;
> + u8 hdmi_support:1;
> + u8 dp_support:1;
> + u8 tmds_support:1;
> + u8 support_reserved:5;
I think we should probably annotate each of these with a version
comment. Otherwise you always have to dig up the spec to see which
version added which field.
Anyways these look to match the spec, so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> u8 not_common3[13];
> u8 iboost_level;
> } __packed;
> --
> 2.6.1
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/i915: Update VBT fields for child devices
2016-03-15 14:47 ` Ville Syrjälä
@ 2016-03-22 16:36 ` Ville Syrjälä
0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2016-03-22 16:36 UTC (permalink / raw)
To: Shubhangi Shrivastava; +Cc: intel-gfx
On Tue, Mar 15, 2016 at 04:47:46PM +0200, Ville Syrjälä wrote:
> On Tue, Mar 15, 2016 at 06:43:53PM +0530, Shubhangi Shrivastava wrote:
> > This patch adds new fields that are not yet added in drm code
> > in child devices struct
> >
> > Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> > Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> > Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
> > drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
> > 2 files changed, 25 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index bf62a19..a26d4b4 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> > }
> >
> > /* Parse the I_boost config for SKL and above */
> > - if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
> > + if (bdb->version >= 196 && child->common.iboost) {
> > info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
> > DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
> > port_name(port), info->dp_boost_level);
> > @@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
> > */
> > memcpy(child_dev_ptr, p_child,
> > min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
> > +
> > + /*
> > + * copied full block, now init values when they are not
> > + * available in current version
> > + */
> > + if (bdb->version < 196) {
> > + /* Set default values for bits added from v196 */
> > + child_dev_ptr->common.iboost = 0;
> > + child_dev_ptr->common.hpd_invert = 0;
> > + }
> > +
> > + if (bdb->version < 192)
> > + child_dev_ptr->common.lspcon = 0;
> > }
> > return;
> > }
> > diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> > index 350d4e0..2898323 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.h
> > +++ b/drivers/gpu/drm/i915/intel_bios.h
> > @@ -250,9 +250,6 @@ struct old_child_dev_config {
> > * versions. Notice that the meaning of the contents contents may still change,
> > * but at least the offsets are consistent. */
> >
> > -/* Definitions for flags_1 */
> > -#define IBOOST_ENABLE (1<<3)
> > -
> > struct common_child_dev_config {
> > u16 handle;
> > u16 device_type;
> > @@ -261,8 +258,17 @@ struct common_child_dev_config {
> > u8 not_common2[2];
> > u8 ddc_pin;
> > u16 edid_ptr;
> > - u8 obsolete;
> > - u8 flags_1;
> > + u8 dvo_cfg; /* See DEVICE_CFG_* above */
> > + u8 efp_routed:1;
> > + u8 lane_reversal:1;
> > + u8 lspcon:1;
> > + u8 iboost:1;
> > + u8 hpd_invert:1;
> > + u8 flag_reserved:3;
> > + u8 hdmi_support:1;
> > + u8 dp_support:1;
> > + u8 tmds_support:1;
> > + u8 support_reserved:5;
>
> I think we should probably annotate each of these with a version
> comment. Otherwise you always have to dig up the spec to see which
> version added which field.
>
> Anyways these look to match the spec, so
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
I tried to apply this, but the code changed underneath so it won't
actually apply. Can you pls rebase and resend?
>
> > u8 not_common3[13];
> > u8 iboost_level;
> > } __packed;
> > --
> > 2.6.1
>
> --
> Ville Syrjälä
> Intel OTC
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-11 13:43 Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-11 13:43 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..2898323 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,8 +258,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-03-11 12:53 Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-03-11 12:53 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 16 +++++++++++-----
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..2898323 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,8 +258,17 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
u8 not_common3[13];
u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-02-12 13:09 Shubhangi Shrivastava
2016-02-16 12:23 ` Jani Nikula
0 siblings, 1 reply; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-02-12 13:09 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 20 +++++++++++++-------
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..833b82b 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,10 +258,19 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
- u8 not_common3[13];
- u8 iboost_level;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
+ u8 not_common3[13];
+ u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/2] drm/i915: Update VBT fields for child devices
2016-02-12 13:09 Shubhangi Shrivastava
@ 2016-02-16 12:23 ` Jani Nikula
0 siblings, 0 replies; 17+ messages in thread
From: Jani Nikula @ 2016-02-16 12:23 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
On Fri, 12 Feb 2016, Shubhangi Shrivastava <shubhangi.shrivastava@intel.com> wrote:
> This patch adds new fields that are not yet added in drm code
> in child devices struct
>
> Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
> Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
> ---
> drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
> drivers/gpu/drm/i915/intel_bios.h | 20 +++++++++++++-------
> 2 files changed, 27 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index bf62a19..a26d4b4 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> }
>
> /* Parse the I_boost config for SKL and above */
> - if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
> + if (bdb->version >= 196 && child->common.iboost) {
> info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
> DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
> port_name(port), info->dp_boost_level);
> @@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
> */
> memcpy(child_dev_ptr, p_child,
> min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
> +
> + /*
> + * copied full block, now init values when they are not
> + * available in current version
> + */
> + if (bdb->version < 196) {
> + /* Set default values for bits added from v196 */
> + child_dev_ptr->common.iboost = 0;
> + child_dev_ptr->common.hpd_invert = 0;
> + }
> +
> + if (bdb->version < 192)
> + child_dev_ptr->common.lspcon = 0;
> }
> return;
> }
> diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> index 350d4e0..833b82b 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -250,9 +250,6 @@ struct old_child_dev_config {
> * versions. Notice that the meaning of the contents contents may still change,
> * but at least the offsets are consistent. */
>
> -/* Definitions for flags_1 */
> -#define IBOOST_ENABLE (1<<3)
> -
> struct common_child_dev_config {
> u16 handle;
> u16 device_type;
> @@ -261,10 +258,19 @@ struct common_child_dev_config {
> u8 not_common2[2];
> u8 ddc_pin;
> u16 edid_ptr;
> - u8 obsolete;
> - u8 flags_1;
> - u8 not_common3[13];
> - u8 iboost_level;
> + u8 dvo_cfg; /* See DEVICE_CFG_* above */
> + u8 efp_routed:1;
> + u8 lane_reversal:1;
> + u8 lspcon:1;
> + u8 iboost:1;
> + u8 hpd_invert:1;
> + u8 flag_reserved:3;
> + u8 hdmi_support:1;
> + u8 dp_support:1;
> + u8 tmds_support:1;
> + u8 support_reserved:5;
> + u8 not_common3[13];
> + u8 iboost_level;
Please use just one space between type and member name, not two.
BR,
Jani.
> } __packed;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/2] drm/i915: Update VBT fields for child devices
@ 2016-02-04 8:58 Shubhangi Shrivastava
0 siblings, 0 replies; 17+ messages in thread
From: Shubhangi Shrivastava @ 2016-02-04 8:58 UTC (permalink / raw)
To: intel-gfx; +Cc: Shubhangi Shrivastava
This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Shubhangi Shrivastava <shubhangi.shrivastava@intel.com>
---
drivers/gpu/drm/i915/intel_bios.c | 15 ++++++++++++++-
drivers/gpu/drm/i915/intel_bios.h | 20 +++++++++++++-------
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index bf62a19..a26d4b4 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1124,7 +1124,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
}
/* Parse the I_boost config for SKL and above */
- if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) {
+ if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level);
@@ -1250,6 +1250,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/
memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
+
+ /*
+ * copied full block, now init values when they are not
+ * available in current version
+ */
+ if (bdb->version < 196) {
+ /* Set default values for bits added from v196 */
+ child_dev_ptr->common.iboost = 0;
+ child_dev_ptr->common.hpd_invert = 0;
+ }
+
+ if (bdb->version < 192)
+ child_dev_ptr->common.lspcon = 0;
}
return;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 350d4e0..833b82b 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -250,9 +250,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */
-/* Definitions for flags_1 */
-#define IBOOST_ENABLE (1<<3)
-
struct common_child_dev_config {
u16 handle;
u16 device_type;
@@ -261,10 +258,19 @@ struct common_child_dev_config {
u8 not_common2[2];
u8 ddc_pin;
u16 edid_ptr;
- u8 obsolete;
- u8 flags_1;
- u8 not_common3[13];
- u8 iboost_level;
+ u8 dvo_cfg; /* See DEVICE_CFG_* above */
+ u8 efp_routed:1;
+ u8 lane_reversal:1;
+ u8 lspcon:1;
+ u8 iboost:1;
+ u8 hpd_invert:1;
+ u8 flag_reserved:3;
+ u8 hdmi_support:1;
+ u8 dp_support:1;
+ u8 tmds_support:1;
+ u8 support_reserved:5;
+ u8 not_common3[13];
+ u8 iboost_level;
} __packed;
--
2.6.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2016-03-31 10:39 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 9:57 [PATCH 1/2] drm/i915: Update VBT fields for child devices Shubhangi Shrivastava
2016-02-25 9:57 ` [PATCH 2/2] drm/i915: Set invert bit for hpd based on VBT Shubhangi Shrivastava
2016-02-25 13:57 ` Ville Syrjälä
2016-02-25 11:34 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Update VBT fields for child devices Patchwork
-- strict thread matches above, loose matches on Subject: below --
2016-03-31 10:41 [PATCH 1/2] " Shubhangi Shrivastava
2016-03-25 17:55 Shubhangi Shrivastava
2016-03-30 14:48 ` Jani Nikula
2016-03-31 10:42 ` Shubhangi Shrivastava
2016-03-24 12:10 Shubhangi Shrivastava
2016-03-15 13:13 Shubhangi Shrivastava
2016-03-15 14:47 ` Ville Syrjälä
2016-03-22 16:36 ` Ville Syrjälä
2016-03-11 13:43 Shubhangi Shrivastava
2016-03-11 12:53 Shubhangi Shrivastava
2016-02-12 13:09 Shubhangi Shrivastava
2016-02-16 12:23 ` Jani Nikula
2016-02-04 8:58 Shubhangi Shrivastava
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.