drm/i915: Add HAS_NATIVE_HDMI2 macro
Subsystems (2)
PATCH 1/1 drm/i915: Add HAS_NATIVE_HDMI2 macro
GLK/GEN 10 and higher GEN platfomrs sport native HDMI 2.0 controller. This patch adds a macro HAS_NATIVE_HDMI2, and uses it to make checks in the code more readable.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_hdmi.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -2719,6 +2719,8 @@ intel_info(const struct drm_i915_private *dev_priv)#define BSD2_RING ENGINE_MASK(VCS2)#define ALL_ENGINES (~0) +#define HAS_HDMI2_NATIVE (dev_priv) \ + (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))#define HAS_ENGINE (dev_priv, id) \ (!!((dev_priv)->info.ring_mask & ENGINE_MASK(id)))
drivers/gpu/drm/i915/intel_hdmi.c +3 -4
@@ -1238,7 +1238,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder) &dev_priv->vbt.ddi_port_info[encoder->port];int max_tmds_clock; -if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv)) +if (HAS_HDMI2_NATIVE (dev_priv)) max_tmds_clock =594000 ;else if (INTEL_GEN (dev_priv) >=8 ||IS_HASWELL (dev_priv)) max_tmds_clock =300000 ;
@@ -1514,8 +1514,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, pipe_config->lane_count =4 ; -if (scdc->scrambling.supported && (INTEL_GEN (dev_priv) >=10 || -IS_GEMINILAKE (dev_priv))) { +if (scdc->scrambling.supported &&HAS_HDMI2_NATIVE (dev_priv)) {if (scdc->scrambling.low_rates) pipe_config->hdmi_scrambling = true;
@@ -2037,7 +2036,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, connector->doublescan_allowed =0 ; connector->stereo_allowed =1 ; -if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv)) +if (HAS_HDMI2_NATIVE (dev_priv)) connector->ycbcr_420_allowed = true; intel_hdmi->ddc_bus =intel_hdmi_ddc_pin (dev_priv, port);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Add HAS_NATIVE_HDMI2 macro
== Series Details ==
== Series Details ==
Series: drm/i915: Add HAS_NATIVE_HDMI2 macro
URL : https://patchwork.freedesktop.org/series/36071/
State : success
== Summary ==
Series 36071v1 drm/i915: Add HAS_NATIVE_HDMI2 macro
https://patchwork.freedesktop.org/api/1.0/series/36071/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
pass -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#104260fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#104260 https://bugs.freedesktop.org/show_bug.cgi?id=104260
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:421s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:367s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:486s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:275s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:480s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:484s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:461s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s fi-elk-e7500 total:224 pass:168 dwarn:10 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:180 dwarn:0 dfail:0 fail:0 skip:108 time:264s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:508s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:388s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:402s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:410s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:463s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:409s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:466s fi-kbl-7560u total:288 pass:268 dwarn:1 dfail:0 fail:0 skip:19 time:497s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:450s fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:499s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:432s fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:503s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:525s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:497s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:475s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:430s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:526s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:397s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:572s fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:598s
fi-glk-dsi failed to collect. IGT log at Patchwork_7617/fi-glk-dsi/igt.log fi-pnv-d510 failed to collect. IGT log at Patchwork_7617/fi-pnv-d510/igt.log
914d61a8fb5fc53f6b0366167210468147495b3f drm-tip: 2018y-01m-05d-09h-12m-18s UTC integration manifest d4b30b22d948 drm/i915: Add HAS_NATIVE_HDMI2 macro
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7617/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Shashank Sharma
GLK/GEN 10 and higher GEN platfomrs sport native HDMI 2.0 controller. This patch adds a macro
HAS_NATIVE_HDMI2, and uses it to make checks in the code more readable.Cc Vivi Rodrigo <[email protected]>Cc Ville Syrjala <[email protected]>Signed-off-by Shashank Sharma <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_hdmi.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -2719,6 +2719,8 @@ intel_info(const struct drm_i915_private *dev_priv)#define BSD2_RING ENGINE_MASK(VCS2)#define ALL_ENGINES (~0) +#define HAS_HDMI2_NATIVE (dev_priv) \ + (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))#define HAS_ENGINE (dev_priv, id) \ (!!((dev_priv)->info.ring_mask & ENGINE_MASK(id)))drivers/gpu/drm/i915/intel_hdmi.c +0
-0
drivers/gpu/drm/i915/intel_hdmi.c static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder) · line 1242
Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1238,7 +1238,7 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder) &dev_priv->vbt.ddi_port_info[encoder->port];int max_tmds_clock; -if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv)) +if (HAS_HDMI2_NATIVE (dev_priv)) max_tmds_clock =594000 ;
I remember someone, probably Ville, saying that here it should be a platform check instead of the feature because it is a decision per platform as documented on our spec.
it is gen>=10 for now, but it can probably change in the future.
So I agree with that view and I believe we need to drop this here.
With this dropped feel free to send next v with:
Quoted 24 lines
drivers/gpu/drm/i915/intel_hdmi.c +2
-3else if (INTEL_GEN (dev_priv) >=8 ||IS_HASWELL (dev_priv)) max_tmds_clock =300000 ;@@ -1514,8 +1514,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, pipe_config->lane_count =4 ; -if (scdc->scrambling.supported && (INTEL_GEN (dev_priv) >=10 || -IS_GEMINILAKE (dev_priv))) { +if (scdc->scrambling.supported &&HAS_HDMI2_NATIVE (dev_priv)) {if (scdc->scrambling.low_rates) pipe_config->hdmi_scrambling = true;@@ -2037,7 +2036,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, connector->doublescan_allowed =0 ; connector->stereo_allowed =1 ; -if (INTEL_GEN (dev_priv) >=10 ||IS_GEMINILAKE (dev_priv)) +if (HAS_HDMI2_NATIVE (dev_priv)) connector->ycbcr_420_allowed = true; intel_hdmi->ddc_bus =intel_hdmi_ddc_pin (dev_priv, port);Signature · 1 line
2.7.4
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx