Skip to content

Commit a5b7991

Browse files
committed
drm/i915/kbl: Use propper ddi buffer translation table for Kabylake ULT and ULX.
Let's introduce ULT and ULX Kabylake definitions and start using it for a propper DDI buffer translation. v2: Remove extra white space. (Paulo) Signed-off-by: Rodrigo Vivi <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]>
1 parent 3614603 commit a5b7991

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,6 +2488,14 @@ struct drm_i915_cmd_table {
24882488
#define IS_SKL_ULX(dev) (INTEL_DEVID(dev) == 0x190E || \
24892489
INTEL_DEVID(dev) == 0x1915 || \
24902490
INTEL_DEVID(dev) == 0x191E)
2491+
#define IS_KBL_ULT(dev) (INTEL_DEVID(dev) == 0x5906 || \
2492+
INTEL_DEVID(dev) == 0x5913 || \
2493+
INTEL_DEVID(dev) == 0x5916 || \
2494+
INTEL_DEVID(dev) == 0x5921 || \
2495+
INTEL_DEVID(dev) == 0x5926)
2496+
#define IS_KBL_ULX(dev) (INTEL_DEVID(dev) == 0x590E || \
2497+
INTEL_DEVID(dev) == 0x5915 || \
2498+
INTEL_DEVID(dev) == 0x591E)
24912499
#define IS_SKL_GT3(dev) (IS_SKYLAKE(dev) && \
24922500
(INTEL_DEVID(dev) & 0x00F0) == 0x0020)
24932501
#define IS_SKL_GT4(dev) (IS_SKYLAKE(dev) && \

drivers/gpu/drm/i915/intel_ddi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ static const struct ddi_buf_trans *skl_get_buf_trans_dp(struct drm_device *dev,
353353
{
354354
const struct ddi_buf_trans *ddi_translations;
355355

356-
if (IS_SKL_ULX(dev)) {
356+
if (IS_SKL_ULX(dev) || IS_KBL_ULX(dev)) {
357357
ddi_translations = skl_y_ddi_translations_dp;
358358
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_dp);
359-
} else if (IS_SKL_ULT(dev)) {
359+
} else if (IS_SKL_ULT(dev) || IS_KBL_ULT(dev)) {
360360
ddi_translations = skl_u_ddi_translations_dp;
361361
*n_entries = ARRAY_SIZE(skl_u_ddi_translations_dp);
362362
} else {
@@ -373,15 +373,15 @@ static const struct ddi_buf_trans *skl_get_buf_trans_edp(struct drm_device *dev,
373373
struct drm_i915_private *dev_priv = dev->dev_private;
374374
const struct ddi_buf_trans *ddi_translations;
375375

376-
if (IS_SKL_ULX(dev)) {
376+
if (IS_SKL_ULX(dev) || IS_KBL_ULX(dev)) {
377377
if (dev_priv->edp_low_vswing) {
378378
ddi_translations = skl_y_ddi_translations_edp;
379379
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_edp);
380380
} else {
381381
ddi_translations = skl_y_ddi_translations_dp;
382382
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_dp);
383383
}
384-
} else if (IS_SKL_ULT(dev)) {
384+
} else if (IS_SKL_ULT(dev) || IS_KBL_ULT(dev)) {
385385
if (dev_priv->edp_low_vswing) {
386386
ddi_translations = skl_u_ddi_translations_edp;
387387
*n_entries = ARRAY_SIZE(skl_u_ddi_translations_edp);
@@ -408,7 +408,7 @@ skl_get_buf_trans_hdmi(struct drm_device *dev,
408408
{
409409
const struct ddi_buf_trans *ddi_translations;
410410

411-
if (IS_SKL_ULX(dev)) {
411+
if (IS_SKL_ULX(dev) || IS_KBL_ULX(dev)) {
412412
ddi_translations = skl_y_ddi_translations_hdmi;
413413
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_hdmi);
414414
} else {

0 commit comments

Comments
 (0)