Enable lspcon support for GEN9 devices
Subsystems (3)
v4 cover Enable lspcon support for GEN9 devices
LSPCON is essentially a dp++->hdmi adapter with dual mode of operation.
These modes are:
- Level Shifter mode: In LS mode, this device works as a type2 dp->hdmi passive dongle, which steps up DP++ output to appropriate HDMI 1.4 signal. This mode doesn't do any conversion at the protocol level.
- Protocol Converter mode: In PCON mode, this device acts as an active DP++->HDMI 2.0 dongle, which converts the DP++ output to compatible HDMI 2.0 output. In PCON mode, lspcon can support 4k@60 outputs, using DP HBR2 mode.
Many of Intel GEN9 devices come with in-built lspcon card in motherboartd down mode. This patch series adds support for lspcon devices in I915 driver.
While unit-testing this code, I was able to see a 4k@60 modeset with:
- BXT-T board
- Single HDMI 4k@60 display (ACER S)
- Ubuntu 14.04 desktop
V2: Worked on review comments from Ville
- In general, Ville suggested not to use the dual personality of DDI to drive lspcon, so this patch set drives it just as DP++ display. There is no separate detection for lspcon (hpd_pulse is good enough), and its being driven as a DP display with special initialization and EDID read sequence. To be able to do this, we driving lspcon in PCON mode only, where it can serve both HDMI1.3/HDMI1.4 sinks as well as 4k@60 capable HDMI 2.0 sinks. So compared to previous series, there is one patch less, as we have dropped lspcon detection patch.
V3: Addressed review comments from Rodrigo
Details available with respective patch.
V4: Addressed review comments from Ville
Details available with respective patch.
Shashank Sharma (4):
drm: Helper for lspcon in drm_dp_dual_mode
drm/i915: Add lspcon support for I915 driver
drm/i915: Parse VBT data for lspcon
drm/i915: Enable lspcon initialization
drivers/gpu/drm/drm_dp_dual_mode_helper.c | 103 ++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_bios.c | 49 ++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 29 ++++++- drivers/gpu/drm/i915/intel_drv.h | 13 ++- drivers/gpu/drm/i915/intel_lspcon.c | 127 ++++++++++++++++++++++++++++++ include/drm/drm_dp_dual_mode_helper.h | 26 ++++++ 8 files changed, 351 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_lspcon.c
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 1/4 drm: Helper for lspcon in drm_dp_dual_mode
This patch adds lspcon support in dp_dual_mode helper. lspcon is essentially a dp->hdmi dongle with dual personality.
LS mode: It works as a passive dongle, by level shifting DP++ signals to HDMI signals, in LS mode.
PCON mode: It works as a protocol converter active dongle in pcon mode, by converting DP++ outputs to HDMI 2.0 outputs.
This patch adds support for lspcon detection and mode set switch operations, as a dp dual mode dongle.
v2: Addressed review comments from Ville
- add adaptor id for lspcon devices (0x08), use it to identify lspcon
- change function names
old: drm_lspcon_get_current_mode/drm_lspcon_change_mode
new: drm_lspcon_get_mode/drm_lspcon_set_mode
- change drm_lspcon_get_mode type to int, to match drm_dp_dual_mode_get_tmds_output
- change 'err' to 'ret' to match the rest of the functions
- remove pointless typecasting during call to dual_mode_read
- fix the but while setting value of data, while writing lspcon mode
- fix indentation
- change mdelay(10) -> msleep(10)
- return ETIMEDOUT instead of EFAULT, when lspcon mode change times out
- Add an empty line to separate std regs macros and lspcon regs macros Indent bit definition
v3: Addressed review comments from Rodrigo
- change macro name from DP_DUAL_MODE_TYPE_LSPCON to DP_DUAL_MODE_TYPE_HAS_DPCD for better readability
- change macro name from DP_DUAL_MODE_LSPCON_MODE_PCON to DP_DUAL_MODE_LSPCON_MODE_PCON for better readability
- add comment for MCA specific offsets like 0x40 and 0x41
- remove DP_DUAL_MODE_REV_TYPE2 check while checking lspcon adapter id
v4: Addressed review comments from Ville
- Fixed indentation at few places
- s/current_mode/mode
- s/reqd_mode/mode
- remove unnecessary void* cast
- remove drm_edid.h from includes
- Add a comment for _HAS_DPCD
- Fix enum description, for lspcon_mode.
--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 103 ++++++++++++++++++++++++++++++ include/drm/drm_dp_dual_mode_helper.h | 26 ++++++++ 2 files changed, 129 insertions(+)
drivers/gpu/drm/drm_dp_dual_mode_helper.c +103 -0
@@ -148,6 +148,14 @@ static bool is_type2_adaptor(uint8_t adaptor_id) DP_DUAL_MODE_REV_TYPE2); } +bool is_lspcon_adaptor (const char hdmi_id[DP_DUAL_MODE_HDMI_ID_LEN ], +const uint8_t adaptor_id) +{ +return is_hdmi_adaptor (hdmi_id) && + (adaptor_id == (DP_DUAL_MODE_TYPE_TYPE2 | +DP_DUAL_MODE_TYPE_HAS_DPCD )); +} +/** * drm_dp_dual_mode_detect - Identify the DP dual mode adaptor * @adapter: I2C adapter for the DDC bus
@@ -203,6 +211,8 @@ enum drm_dp_dual_mode_type drm_dp_dual_mode_detect(struct i2c_adapter *adapter) ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_ADAPTOR_ID , &adaptor_id,sizeof (adaptor_id));if (ret ==0 ) { +if (is_lspcon_adaptor (hdmi_id, adaptor_id)) +return DRM_DP_DUAL_MODE_LSPCON ;if (is_type2_adaptor (adaptor_id)) {if (is_hdmi_adaptor (hdmi_id))return DRM_DP_DUAL_MODE_TYPE2_HDMI ;
@@ -364,3 +374,96 @@ const char *drm_dp_get_dual_mode_type_name(enum drm_dp_dual_mode_type type) } }EXPORT_SYMBOL (drm_dp_get_dual_mode_type_name); + +/** +* drm_lspcon_get_mode: Get LSPCON's current mode of operation by +* by reading offset (0x80, 0x41) +* @i2c_adapter: I2C-over-aux adapter +* @current_mode: out vaiable, current lspcon mode of operation +* +* Returns: +* 0 on success, sets the current_mode value to appropriate mode +* -error on failure +*/ +int drm_lspcon_get_mode (struct i2c_adapter *adapter, +enum drm_lspcon_mode *mode) +{ +u8 data; +int ret =0 ; + +if (!mode) { +DRM_ERROR ("NULL input\n" ); +return -EINVAL ; + } + +/* Read Status: i2c over aux */ + ret =drm_dp_dual_mode_read (adapter,DP_DUAL_MODE_LSPCON_CURRENT_MODE , + &data,sizeof (data)); +if (ret <0 ) { +DRM_ERROR ("LSPCON read(0x80, 0x41) failed\n" ); +return -EFAULT ; + } + +if (data &DP_DUAL_MODE_LSPCON_MODE_PCON ) + *mode =DRM_LSPCON_MODE_PCON ; +else + *mode =DRM_LSPCON_MODE_LS ; +return 0 ; +} +EXPORT_SYMBOL (drm_lspcon_get_mode); + +/** +* drm_lspcon_change_mode: Change LSPCON's mode of operation by +* by writing offset (0x80, 0x40) +* @i2c_adapter: I2C-over-aux adapter +* @reqd_mode: required mode of operation +* +* Returns: +* 0 on success, -error on failure/timeout +*/ +int drm_lspcon_set_mode (struct i2c_adapter *adapter, +enum drm_lspcon_mode mode) +{ +u8 data =0 ; +int ret; +int time_out =200 ; +enum drm_lspcon_mode current_mode; + +if (mode ==DRM_LSPCON_MODE_PCON ) + data =DP_DUAL_MODE_LSPCON_MODE_PCON ; + +/* Change mode */ + ret =drm_dp_dual_mode_write (adapter,DP_DUAL_MODE_LSPCON_MODE_CHANGE , + &data,sizeof (data)); +if (ret <0 ) { +DRM_ERROR ("LSPCON mode change failed\n" ); +return ret; + } + +/* +* Confirm mode change by reading the status bit. +* Sometimes, it takes a while to change the mode, +* so wait and retry until time out or done. +*/ +do { + ret =drm_lspcon_get_mode (adapter, ¤t_mode); +if (ret) { +DRM_ERROR ("can't confirm LSPCON mode change\n" ); +return ret; + }else { +if (current_mode != mode) { +msleep (10 ); + time_out -=10 ; + }else { +DRM_DEBUG_KMS ("LSPCON mode changed to %s\n" , + mode ==DRM_LSPCON_MODE_LS ? +"LS" :"PCON" ); +return 0 ; + } + } + }while (time_out); + +DRM_ERROR ("LSPCON mode change timed out\n" ); +return -ETIMEDOUT ; +} +EXPORT_SYMBOL (drm_lspcon_set_mode);
include/drm/drm_dp_dual_mode_helper.h +26 -0
@@ -40,6 +40,8 @@#define DP_DUAL_MODE_REV_TYPE2 0x00#define DP_DUAL_MODE_TYPE_MASK 0xf0#define DP_DUAL_MODE_TYPE_TYPE2 0xa0 +/* This field is marked reserved in dual mode spec, used in LSPCON */ +#define DP_DUAL_MODE_TYPE_HAS_DPCD 0x08#define DP_DUAL_MODE_IEEE_OUI 0x11/* 11-13*/ #define DP_DUAL_IEEE_OUI_LEN 3#define DP_DUAL_DEVICE_ID 0x14/* 14-19 */
@@ -55,6 +57,11 @@#define DP_DUAL_MODE_CEC_ENABLE 0x01#define DP_DUAL_MODE_I2C_SPEED_CTRL 0x22 +/* LSPCON specific registers, defined by MCA */ +#define DP_DUAL_MODE_LSPCON_MODE_CHANGE 0x40 +#define DP_DUAL_MODE_LSPCON_CURRENT_MODE 0x41 +#define DP_DUAL_MODE_LSPCON_MODE_PCON 0x1 +struct i2c_adapter ; ssize_t drm_dp_dual_mode_read(struct i2c_adapter *adapter,
@@ -63,6 +70,19 @@ ssize_t drm_dp_dual_mode_write(struct i2c_adapter *adapter, u8 offset, const void *buffer, size_t size);/** +* enum drm_lspcon_mode +* @lspcon_mode_ls: Level shifter mode of LSPCON +* which drives DP++ to HDMI 1.4 conversion. +* @lspcon_mode_pcon: Protocol converter mode of LSPCON +* which drives DP++ to HDMI 2.0 active conversion. +*/ +enum drm_lspcon_mode { +DRM_LSPCON_MODE_INVALID , +DRM_LSPCON_MODE_LS , +DRM_LSPCON_MODE_PCON , +}; + +/** * enum drm_dp_dual_mode_type - Type of the DP dual mode adaptor * @DRM_DP_DUAL_MODE_NONE: No DP dual mode adaptor * @DRM_DP_DUAL_MODE_UNKNOWN: Could be either none or type 1 DVI adaptor
@@ -70,6 +90,7 @@ ssize_t drm_dp_dual_mode_write(struct i2c_adapter *adapter,* @DRM_DP_DUAL_MODE_TYPE1_HDMI: Type 1 HDMI adaptor * @DRM_DP_DUAL_MODE_TYPE2_DVI: Type 2 DVI adaptor * @DRM_DP_DUAL_MODE_TYPE2_HDMI: Type 2 HDMI adaptor +* @DRM_DP_DUAL_MODE_TYPE2_LSPCON: Level shifter /protocol converter */ enum drm_dp_dual_mode_type {DRM_DP_DUAL_MODE_NONE ,
@@ -78,6 +99,7 @@ enum drm_dp_dual_mode_type {DRM_DP_DUAL_MODE_TYPE1_HDMI ,DRM_DP_DUAL_MODE_TYPE2_DVI ,DRM_DP_DUAL_MODE_TYPE2_HDMI , + DRM_DP_DUAL_MODE_LSPCON, };enum drm_dp_dual_mode_type drm_dp_dual_mode_detect (struct i2c_adapter *adapter);
@@ -89,4 +111,8 @@ int drm_dp_dual_mode_set_tmds_output(enum drm_dp_dual_mode_type type, struct i2c_adapter *adapter, bool enable);const char *drm_dp_get_dual_mode_type_name (enum drm_dp_dual_mode_type type); +int drm_lspcon_get_mode (struct i2c_adapter *adapter, +enum drm_lspcon_mode *current_mode); +int drm_lspcon_set_mode (struct i2c_adapter *adapter, +enum drm_lspcon_mode reqd_mode);#endif
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botRe: [PATCH v4 1/4] drm: Helper for lspcon in drm_dp_dual_mode
All warnings (new ones prefixed by >>):
Hi Shashank,
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.8-rc3 next-20160823]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Shashank-Sharma/Enable-lspcon-support-for-GEN9-devices/20160818-183353 base: git://anongit.freedesktop.org/drm-intel for-linux-next reproduce: make htmldocs
All warnings (new ones prefixed by >>):
include/drm/drm_fourcc.h:1: warning: no structured comments found include/drm/drm_crtc.h:848: warning: No description found for parameter 'index' include/drm/drm_crtc.h:1223: warning: No description found for parameter 'index' include/drm/drm_crtc.h:1720: warning: No description found for parameter 'index' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'connector_ida' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'edid_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dpms_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'path_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tile_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'plane_type_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'rotation_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_x' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_y' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_w' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_src_h' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_x' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_y' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_w' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_h' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_fb_id' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_crtc_id' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_active' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'prop_mode_id' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dvi_i_subconnector_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dvi_i_select_subconnector_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_subconnector_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_select_subconnector_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_mode_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_left_margin_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_right_margin_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_top_margin_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_bottom_margin_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_brightness_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_contrast_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_flicker_reduction_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_overscan_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_saturation_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'tv_hue_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'scaling_mode_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'aspect_ratio_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'dirty_info_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'suggested_x_property' include/drm/drm_crtc.h:2505: warning: No description found for parameter 'suggested_y_property' include/drm/drmP.h:172: warning: No description found for parameter 'fmt' include/drm/drmP.h:188: warning: No description found for parameter 'fmt' include/drm/drmP.h:206: warning: No description found for parameter 'fmt' include/drm/drmP.h:251: warning: No description found for parameter 'dev' include/drm/drmP.h:251: warning: No description found for parameter 'data' include/drm/drmP.h:251: warning: No description found for parameter 'file_priv' include/drm/drmP.h:284: warning: No description found for parameter 'ioctl' include/drm/drmP.h:284: warning: No description found for parameter '_func' include/drm/drmP.h:284: warning: No description found for parameter '_flags' include/drm/drmP.h:365: warning: cannot understand function prototype: 'struct drm_lock_data ' include/drm/drmP.h:392: warning: cannot understand function prototype: 'struct drm_driver ' include/drm/drmP.h:655: warning: cannot understand function prototype: 'struct drm_info_list ' include/drm/drmP.h:665: warning: cannot understand function prototype: 'struct drm_info_node ' include/drm/drmP.h:675: warning: cannot understand function prototype: 'struct drm_minor ' include/drm/drmP.h:720: warning: cannot understand function prototype: 'struct drm_device ' include/drm/drm_dp_helper.h:752: warning: No description found for parameter 'i2c_nack_count' include/drm/drm_dp_helper.h:752: warning: No description found for parameter 'i2c_defer_count'
>> drivers/gpu/drm/drm_dp_dual_mode_helper.c:390: warning: No description found for parameter 'adapter' >> drivers/gpu/drm/drm_dp_dual_mode_helper.c:390: warning: No description found for parameter 'mode' >> drivers/gpu/drm/drm_dp_dual_mode_helper.c:390: warning: Excess function parameter 'i2c_adapter' description in 'drm_lspcon_get_mode' >> drivers/gpu/drm/drm_dp_dual_mode_helper.c:390: warning: Excess function parameter 'current_mode' description in 'drm_lspcon_get_mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:426: warning: No description found for parameter 'adapter' drivers/gpu/drm/drm_dp_dual_mode_helper.c:426: warning: No description found for parameter 'mode' >> drivers/gpu/drm/drm_dp_dual_mode_helper.c:426: warning: Excess function parameter 'i2c_adapter' description in 'drm_lspcon_set_mode' >> drivers/gpu/drm/drm_dp_dual_mode_helper.c:426: warning: Excess function parameter 'reqd_mode' description in 'drm_lspcon_set_mode' >> include/drm/drm_dp_dual_mode_helper.h:84: warning: Enum value 'DRM_LSPCON_MODE_INVALID' not described in enum 'drm_lspcon_mode' >> include/drm/drm_dp_dual_mode_helper.h:84: warning: Enum value 'DRM_LSPCON_MODE_LS' not described in enum 'drm_lspcon_mode' >> include/drm/drm_dp_dual_mode_helper.h:84: warning: Enum value 'DRM_LSPCON_MODE_PCON' not described in enum 'drm_lspcon_mode' >> include/drm/drm_dp_dual_mode_helper.h:104: warning: Enum value 'DRM_DP_DUAL_MODE_LSPCON' not described in enum 'drm_dp_dual_mode_type'
drivers/gpu/drm/drm_dp_dual_mode_helper.c:391: warning: No description found for parameter 'adapter' drivers/gpu/drm/drm_dp_dual_mode_helper.c:391: warning: No description found for parameter 'mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:391: warning: Excess function parameter 'i2c_adapter' description in 'drm_lspcon_get_mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:391: warning: Excess function parameter 'current_mode' description in 'drm_lspcon_get_mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:427: warning: No description found for parameter 'adapter' drivers/gpu/drm/drm_dp_dual_mode_helper.c:427: warning: No description found for parameter 'mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:427: warning: Excess function parameter 'i2c_adapter' description in 'drm_lspcon_set_mode' drivers/gpu/drm/drm_dp_dual_mode_helper.c:427: warning: Excess function parameter 'reqd_mode' description in 'drm_lspcon_set_mode' drivers/gpu/drm/drm_dp_mst_topology.c:2383: warning: No description found for parameter 'connector' include/drm/drm_dp_mst_helper.h:93: warning: No description found for parameter 'cached_edid' include/drm/drm_dp_mst_helper.h:93: warning: No description found for parameter 'has_audio' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'max_dpcd_transaction_bytes' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'sink_count' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'total_slots' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'avail_slots' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'total_pbn' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'qlock' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_msg_downq' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_down_in_progress' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payload_lock' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'proposed_vcpis' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payloads' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'payload_mask' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'vcpi_mask' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_waitq' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'work' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'tx_work' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_list' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_lock' include/drm/drm_dp_mst_helper.h:467: warning: No description found for parameter 'destroy_connector_work' drivers/gpu/drm/drm_dp_mst_topology.c:2384: warning: No description found for parameter 'connector' drivers/gpu/drm/i915/i915_vgpu.c:105: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_vgpu.c:184: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_vgpu.c:184: warning: Excess function parameter 'dev' description in 'intel_vgt_balloon' drivers/gpu/drm/i915/i915_vgpu.c:106: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_vgpu.c:185: warning: No description found for parameter 'dev_priv' drivers/gpu/drm/i915/i915_vgpu.c:185: warning: Excess function parameter 'dev' description in 'intel_vgt_balloon' drivers/gpu/drm/i915/i915_gem.c:929: warning: No description found for parameter 'i915' drivers/gpu/drm/i915/i915_gem.c:929: warning: Excess function parameter 'dev' description in 'i915_gem_gtt_pwrite_fast' drivers/gpu/drm/i915/intel_hotplug.c:543: warning: Excess function parameter 'enabled' description in 'intel_hpd_poll_init' drivers/gpu/drm/i915/intel_hotplug.c:544: warning: Excess function parameter 'enabled' description in 'intel_hpd_poll_init' drivers/gpu/drm/i915/intel_fbc.c:1087: warning: No description found for parameter 'crtc_state' drivers/gpu/drm/i915/intel_fbc.c:1087: warning: No description found for parameter 'plane_state' drivers/gpu/drm/i915/intel_fbc.c:1088: warning: No description found for parameter 'crtc_state' drivers/gpu/drm/i915/intel_fbc.c:1088: warning: No description found for parameter 'plane_state' Documentation/gpu/drm-internals.rst:249: ERROR: Unexpected indentation. Documentation/gpu/drm-internals.rst:188: ERROR: Unknown target name: "devm".
Documentation/gpu/drm-kms.rst:929: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:971: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:1451: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:1565: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:1615: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:1627: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-kms.rst:836: WARNING: Option list ends without a blank line; unexpected unindent. Documentation/gpu/drm-kms-helpers.rst:647: WARNING: Inline emphasis start-string without end-string. Documentation/gpu/drm-kms-helpers.rst:275: WARNING: Inline literal start-string without end-string. Documentation/gpu/drm-mm.rst:505: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/i915/intel_uncore.c:1622: ERROR: Unexpected indentation.
Documentation/gpu/i915.rst:156: WARNING: Block quote ends without a blank line; unexpected unindent. drivers/gpu/drm/i915/intel_uncore.c:1656: ERROR: Unexpected indentation.
Documentation/gpu/i915.rst:192: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/gpu/i915.rst:129: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/gpu/i915.rst:148: WARNING: Inline emphasis start-string without end-string. Documentation/gpu/i915.rst:148: WARNING: Inline emphasis start-string without end-string. drivers/gpu/drm/i915/intel_lrc.c:1165: ERROR: Unexpected indentation.
Documentation/gpu/i915.rst:339: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/gpu/i915.rst:329: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/gpu/i915.rst:348: WARNING: Enumerated list ends without a blank line; unexpected unindent. Documentation/gpu/drm-kms.rst:499: WARNING: Could not lex literal_block as "C". Highlighting skipped. Documentation/gpu/drm-kms-helpers.rst:125: WARNING: Could not lex literal_block as "C". Highlighting skipped. Documentation/gpu/i915.rst:109: WARNING: Could not lex literal_block as "C". Highlighting skipped.
vim +/adapter +390 drivers/gpu/drm/drm_dp_dual_mode_helper.c
384 * Returns:
385 * 0 on success, sets the current_mode value to appropriate mode
386 * -error on failure
387 */
388 int drm_lspcon_get_mode(struct i2c_adapter *adapter,
389 enum drm_lspcon_mode *mode)
> 390 {
391 u8 data;
392 int ret = 0;
393
394 if (!mode) {
395 DRM_ERROR("NULL input\n");
396 return -EINVAL;
397 }
398
399 /* Read Status: i2c over aux */
400 ret = drm_dp_dual_mode_read(adapter, DP_DUAL_MODE_LSPCON_CURRENT_MODE,
401 &data, sizeof(data));
402 if (ret < 0) {
403 DRM_ERROR("LSPCON read(0x80, 0x41) failed\n");
404 return -EFAULT;
405 }
406
407 if (data & DP_DUAL_MODE_LSPCON_MODE_PCON)
408 *mode = DRM_LSPCON_MODE_PCON;
409 else
410 *mode = DRM_LSPCON_MODE_LS;
411 return 0;
412 }
413 EXPORT_SYMBOL(drm_lspcon_get_mode);
414
415 /**
416 * drm_lspcon_change_mode: Change LSPCON's mode of operation by
417 * by writing offset (0x80, 0x40)
418 * @i2c_adapter: I2C-over-aux adapter
419 * @reqd_mode: required mode of operation
420 *
421 * Returns:
422 * 0 on success, -error on failure/timeout
423 */
424 int drm_lspcon_set_mode(struct i2c_adapter *adapter,
425 enum drm_lspcon_mode mode)
> 426 { 427 u8 data = 0;
428 int ret;
429 int time_out = 200;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 2/4 drm/i915: Add lspcon support for I915 driver
In reply to Shashank SharmaThis patch adds a new file, to accommodate lspcon support for I915 driver. These functions probe, detect, initialize and configure an on-board lspcon device during the driver init time.
Also, this patch adds a small structure for lspcon device, which will provide the runtime status of the device.
V2: addressed ville's review comments
- Clean the leftover macros from previous patch set
V3: Rebase
V4: addressed ville's review comments
- make internal functions static
- remove lspcon_detect_identifier, make it inline with lspcon_probe
- remove is_lspcon_active function
- remove force check while setting a lspcon mode
--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_drv.h | 13 +++- drivers/gpu/drm/i915/intel_lspcon.c | 127 ++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/i915/intel_lspcon.c
drivers/gpu/drm/i915/Makefile +1 -0
@@ -98,6 +98,7 @@ i915-y += dvo_ch7017.o \ intel_dvo.o \ intel_hdmi.o \ intel_i2c.o \ + intel_lspcon.o \ intel_lvds.o \ intel_panel.o \ intel_sdvo.o \
drivers/gpu/drm/i915/intel_drv.h +12 -1
@@ -920,12 +920,19 @@ struct intel_dp {bool compliance_test_active; }; +struct intel_lspcon { +bool active; +enum drm_lspcon_mode mode; +struct drm_dp_aux *aux; +}; +struct intel_digital_port {struct intel_encoder base;enum port port;u32 saved_port_bits;struct intel_dp dp;struct intel_hdmi hdmi; +struct intel_lspcon lspcon;enum irqreturn (*hpd_pulse)(struct intel_digital_port *,bool );bool release_cl2_override;uint8_t max_lanes;
@@ -1491,7 +1498,6 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config);void intel_dp_dual_mode_set_tmds_output (struct intel_hdmi *hdmi,bool enable); -/* intel_lvds.c */ void intel_lvds_init (struct drm_device *dev);struct intel_encoder *intel_get_lvds_encoder (struct drm_device *dev);
@@ -1785,4 +1791,9 @@ int intel_color_check(struct drm_crtc *crtc, struct drm_crtc_state *state);void intel_color_set_csc (struct drm_crtc_state *crtc_state);void intel_color_load_luts (struct drm_crtc_state *crtc_state); +/* intel_lspcon.c */ +bool lspcon_init (struct intel_digital_port *intel_dig_port); +enum drm_connector_status +lspcon_ls_mode_detect (struct drm_connector *connector,bool force); +bool is_lspcon_active (struct intel_digital_port *dig_port);#endif /* __INTEL_DRV_H__ */
drivers/gpu/drm/i915/intel_lspcon.c new file +127 -0
127 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 3/4 drm/i915: Parse VBT data for lspcon
In reply to Shashank SharmaMany GEN9 boards come with on-board lspcon cards.
Fot these boards, VBT configuration should properly point out if a particular port contains lspcon device, so that driver can initialize it properly.
This patch adds a utility function, which checks the VBT flag for lspcon bit, and tells us if a port is configured to have a lspcon device or not.
V2: Fixed review comments from Ville
- Do not forget PORT_D while checking lspcon for GEN9
V3: Addressed review comments from Rodrigo
- Create a HAS_LSPCON() macro for better use case handling.
- Do not dump warnings for non-gen-9 platforms, it will be noise.
V4: Rebase
--- drivers/gpu/drm/i915/i915_drv.h | 5 ++++ drivers/gpu/drm/i915/intel_bios.c | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -2791,6 +2791,8 @@ struct drm_i915_cmd_table {#define HAS_GMCH_DISPLAY (dev) (INTEL_INFO(dev)->gen < 5 || \ IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) +#define HAS_LSPCON (dev) (IS_GEN9(dev)) +/* DPF == dynamic parity feature */ #define HAS_L3_DPF (dev) (IS_IVYBRIDGE(dev) || IS_HASWELL(dev))#define NUM_L3_SLICES (dev) (IS_HSW_GT3(dev) ? 2 : HAS_L3_DPF(dev))
@@ -3574,6 +3576,9 @@ bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *dev_priv, enum porbool intel_bios_is_dsi_present (struct drm_i915_private *dev_priv,enum port *port);bool intel_bios_is_port_hpd_inverted (struct drm_i915_private *dev_priv,enum port port); +bool intel_bios_is_lspcon_present (struct drm_i915_private *dev_priv, +enum port port); +/* intel_opregion.c */ #ifdef CONFIG_ACPI
drivers/gpu/drm/i915/intel_bios.c +49 -0
52 lines not on this page · raw message
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 4/4 drm/i915: Enable lspcon initialization
In reply to Shashank SharmaThis patch adds initialization code for lspcon.
What we are doing here is:
- Check if lspcon is configured in VBT for this port
- If lspcon is configured, initialize it and configure it as DP port.
V2: Addressed Ville's review comments:
- Not adding AVI IF functions for LSPCON display now. This part will be added once the dig_port level AVI-IF series gets merged.
V3: Rebase
V4: Rebase
--- drivers/gpu/drm/i915/intel_ddi.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_ddi.c +28 -1
@@ -2325,7 +2325,7 @@ void intel_ddi_init(struct drm_device *dev, enum port port)struct intel_digital_port *intel_dig_port;struct intel_encoder *intel_encoder;struct drm_encoder *encoder; -bool init_hdmi, init_dp; +bool init_hdmi, init_dp, init_lspcon = false;int max_lanes;if (I915_READ (DDI_BUF_CTL (PORT_A )) &DDI_A_4_LANES ) {
@@ -2357,6 +2357,19 @@ void intel_ddi_init(struct drm_device *dev, enum port port) init_hdmi = (dev_priv->vbt.ddi_port_info[port].supports_dvi || dev_priv->vbt.ddi_port_info[port].supports_hdmi); init_dp = dev_priv->vbt.ddi_port_info[port].supports_dp; + +if (intel_bios_is_lspcon_present (dev_priv, port)) { +/* +* Lspcon device needs to be driven with DP connector +* with special detection sequence. So make sure DP +* is initialized before lspcon. +*/ + init_dp = true; + init_lspcon = true; + init_hdmi = false; +DRM_DEBUG_KMS ("VBT says port %c has lspcon\n" ,port_name (port)); + } +if (!init_dp && !init_hdmi) {DRM_DEBUG_KMS ("VBT says port %c is not DVI/HDMI/DP compatible, respect it\n" ,port_name (port));
@@ -2432,6 +2445,20 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; } +if (init_lspcon) { +if (lspcon_init (intel_dig_port)) +/* TODO: handle hdmi info frame part */ +DRM_DEBUG_KMS ("LSPCON init success on port %c\n" , +port_name (port)); +else +/* +* LSPCON init faied, but DP init was success, so +* lets try to drive as DP++ port. +*/ +DRM_ERROR ("LSPCON init failed on port %c\n" , +port_name (port)); + } +return ; err:
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: warning for Enable lspcon support for GEN9 devices (rev4)
In reply to Shashank Sharma== Series Details ==
== Series Details ==
Series: Enable lspcon support for GEN9 devices (rev4)
URL : https://patchwork.freedesktop.org/series/8024/
State : warning
== Summary ==
Series 8024v4 Enable lspcon support for GEN9 devices
http://patchwork.freedesktop.org/api/1.0/series/8024/revisions/4/mbox
Test kms_cursor_legacy:
Subgroup basic-flip-vs-cursor-legacy:
fail -> PASS (ro-bdw-i5-5250u)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a-frame-sequence:
fail -> PASS (ro-byt-n2820)
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> SKIP (ro-bdw-i5-5250u)
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (ro-bdw-i7-5600u)
skip -> DMESG-WARN (ro-bdw-i5-5250u)fi-kbl-qkkr total:244 pass:185 dwarn:29 dfail:0 fail:3 skip:27 fi-skl-i7-6700k total:244 pass:208 dwarn:4 dfail:2 fail:2 skip:28 fi-snb-i7-2600 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 ro-bdw-i5-5250u total:240 pass:219 dwarn:2 dfail:0 fail:1 skip:18 ro-bdw-i7-5557U total:240 pass:220 dwarn:2 dfail:0 fail:0 skip:18 ro-bdw-i7-5600u total:240 pass:205 dwarn:2 dfail:0 fail:1 skip:32 ro-bsw-n3050 total:240 pass:195 dwarn:0 dfail:0 fail:3 skip:42 ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40 ro-hsw-i3-4010u total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26 ro-hsw-i7-4770r total:240 pass:185 dwarn:0 dfail:0 fail:0 skip:55 ro-ilk1-i5-650 total:235 pass:174 dwarn:0 dfail:0 fail:1 skip:60 ro-ivb-i7-3770 total:240 pass:205 dwarn:0 dfail:0 fail:0 skip:35 ro-ivb2-i7-3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31 ro-skl3-i5-6260u total:240 pass:222 dwarn:0 dfail:0 fail:4 skip:14
fi-hsw-i7-4770k failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1895/
b5e8283 drm-intel-nightly: 2016y-08m-16d-15h-40m-39s UTC integration manifest b13a9ba drm/i915: Enable lspcon initialization
0f55126 drm/i915: Parse VBT data for lspcon
8f5dc47 drm/i915: Add lspcon support for I915 driver
9357f6b drm: Helper for lspcon in drm_dp_dual_mode
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi,
Quoted 35 lines · Shashank Sharma
LSPCON is essentially a dp++->hdmi adapter with dual mode of operation.
These modes are:
- Level Shifter mode: In LS mode, this device works as a type2dp->hdmipassive dongle, which steps up DP++ output to appropriate HDMI 1.4 signal. This mode doesn't do any conversion at the protocol level.- Protocol Converter mode: In PCON mode, this device acts as an active DP++->HDMI 2.0 dongle, which converts the DP++ output to compatible HDMI 2.0 output. In PCON mode, lspcon can support 4k@60 outputs, using DP HBR2 mode.
Many of Intel GEN9 devices come with in-built lspcon card in motherboartd down mode. This patch series adds support for lspcon devices in I915 driver.
While unit-testing this code, I was able to see a 4k@60 modeset with:
- BXT-T board
- Single HDMI 4k@60 display (ACER S)
- Ubuntu 14.04 desktopV2: Worked on review comments from Ville
- In general, Ville suggested not to use the dual personality of DDI to drive lspcon, so this patch set drives it just as DP++ display. There is no separate detection for lspcon (hpd_pulseis good enough), and its being driven as a DP display with special initialization and EDID read sequence. To be able to do this, we driving lspcon in PCON mode only, where it can serve both HDMI1.3/HDMI1.4 sinks as well as 4k@60 capable HDMI 2.0 sinks. So compared to previous series, there is one patch less, as we have dropped lspcon detection patch.V3: Addressed review comments from Rodrigo
Details available with respective patch.
Quoted 8 lines
V4: Addressed review comments from Ville
Details available with respective patch.Shashank Sharma (4):
drm: Helper for lspcon indrm_dp_dual_mode
drm/i915: Add lspcon support for I915 driver
drm/i915: Parse VBT data for lspcon
drm/i915: Enable lspcon initialization
Testing these patches on my APL RVP, modesetting works fine, but after suspend-to-ram the LSPCON output stops working. Link training fails during the resume time enabling and I can't get any hotplug interrupts afterwards, or make it recover in any way.
Debugging it further I see that right after resume a DPCD read succeeds but returns corrupted values. I'm thinking that there is some delay while the LSPCON HW/FW is initializing and trying to do link training during this time gets it into the broken state. At least delaying the encoder enabling after resume by 100ms fixes things, DPCD reads return correct values and link training/modesetting will succeed.
Have you seen this on the other platforms?
The FW version I have is 1.39 as reported by DPCD 0x50A/0x50B.
--Imre
Quoted 9 lines
drivers/gpu/drm/drm_dp_dual_mode_helper.c | 103 ++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_bios.c | 49 ++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 29 ++++++- drivers/gpu/drm/i915/intel_drv.h | 13 ++- drivers/gpu/drm/i915/intel_lspcon.c | 127 ++++++++++++++++++++++++++++++ include/drm/drm_dp_dual_mode_helper.h | 26 ++++++
Quoted 3 lines
8 files changed, 351 insertions(+), 2 deletions(-)create mode 100644
drivers/gpu/drm/i915/intel_lspcon.c
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Regards
Shashank
Quoted 58 lines · Imre Deak
Hi,
Quoted 35 lines · Shashank Sharma
LSPCON is essentially a dp++->hdmi adapter with dual mode of operation.
These modes are:
- Level Shifter mode: In LS mode, this device works as a type2dp->hdmipassive dongle, which steps up DP++ output to appropriate HDMI 1.4 signal. This mode doesn't do any conversion at the protocol level.- Protocol Converter mode: In PCON mode, this device acts as an active DP++->HDMI 2.0 dongle, which converts the DP++ output to compatible HDMI 2.0 output. In PCON mode, lspcon can support 4k@60 outputs, using DP HBR2 mode.
Many of Intel GEN9 devices come with in-built lspcon card in motherboartd down mode. This patch series adds support for lspcon devices in I915 driver.
While unit-testing this code, I was able to see a 4k@60 modeset with:
- BXT-T board
- Single HDMI 4k@60 display (ACER S)
- Ubuntu 14.04 desktopV2: Worked on review comments from Ville
- In general, Ville suggested not to use the dual personality of DDI to drive lspcon, so this patch set drives it just as DP++ display. There is no separate detection for lspcon (hpd_pulseis good enough), and its being driven as a DP display with special initialization and EDID read sequence. To be able to do this, we driving lspcon in PCON mode only, where it can serve both HDMI1.3/HDMI1.4 sinks as well as 4k@60 capable HDMI 2.0 sinks. So compared to previous series, there is one patch less, as we have dropped lspcon detection patch.V3: Addressed review comments from Rodrigo
Details available with respective patch.Quoted 8 lines
V4: Addressed review comments from Ville
Details available with respective patch.Shashank Sharma (4):
drm: Helper for lspcon indrm_dp_dual_mode
drm/i915: Add lspcon support for I915 driver
drm/i915: Parse VBT data for lspcon
drm/i915: Enable lspcon initializationTesting these patches on my APL RVP, modesetting works fine, but after suspend-to-ram the LSPCON output stops working. Link training fails during the resume time enabling and I can't get any hotplug interrupts afterwards, or make it recover in any way.
Debugging it further I see that right after resume a DPCD read succeeds but returns corrupted values. I'm thinking that there is some delay while the LSPCON HW/FW is initializing and trying to do link training during this time gets it into the broken state. At least delaying the encoder enabling after resume by 100ms fixes things, DPCD reads return correct values and link training/modesetting will succeed.
Quoted 5 lines
Have you seen this on the other platforms?
The FW version I have is 1.39 as reported by DPCD 0x50A/0x50B.
--Imre
I am using a BXT-T board with external LSPCON debug chip, and I don't see this problem with my setup. Let me try to test this with APL too.
Shashank
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/drm_dp_dual_mode_helper.c | 103 ++++++++++++++++++++++++ drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_bios.c | 49 ++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 29 ++++++- drivers/gpu/drm/i915/intel_drv.h | 13 ++- drivers/gpu/drm/i915/intel_lspcon.c | 127 ++++++++++++++++++++++++++++++ include/drm/drm_dp_dual_mode_helper.h | 26 ++++++ 8 files changed, 351 insertions(+), 2 deletions(-)create mode 100644
drivers/gpu/drm/i915/intel_lspcon.c
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hello Imre,
Sorry, it took me some time to come back, suspend resume was broken for us, it just got fixed, and I could test the LSPCON code with Android APL. I am not able to reproduce this issue on Android APL board.
I tried to reproduce this issue on APL + Ubuntu-Linux, but I am not able to boot Linux tree on APL, as I do on a BXT-T. Looks like kernel image is not being picked by BIOS.
Can you please let me know which defconfig you are following to boot Linux on APL or any special BKMs ?
Regards
Shashank
-----Original Message-----
From: Deak, Imre
Sent: Thursday, August 25, 2016 8:59 PM
To: Sharma, Shashank <[email protected]>; [email protected]; [email protected]
Cc: Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-gfx] [PATCH v4 0/4] Enable lspcon support for GEN9 devices
Hi,
Quoted 40 lines · Shashank Sharma
LSPCON is essentially a dp++->hdmi adapter with dual mode of operation.
These modes are:
- Level Shifter mode: In LS mode, this device works as a type2dp->hdmipassive dongle, which steps up DP++ output to appropriate HDMI 1.4 signal. This mode doesn't do any conversion at the protocol level.- Protocol Converter mode: In PCON mode, this device acts as an active DP++->HDMI 2.0 dongle, which converts the DP++ output to compatible HDMI 2.0 output. In PCON mode, lspcon can support 4k@60 outputs, using DP HBR2 mode.
Many of Intel GEN9 devices come with in-built lspcon card in motherboartd down mode. This patch series adds support for lspcon devices in I915 driver.
While unit-testing this code, I was able to see a 4k@60 modeset with:
- BXT-T board
- Single HDMI 4k@60 display (ACER S)
- Ubuntu 14.04 desktopV2: Worked on review comments from Ville
- In general, Ville suggested not to use the dual personality of DDI to drive lspcon, so this patch set drives it just as DP++ display. There is no separate detection for lspcon (hpd_pulseis good enough), and
its being driven as a DP display with special initialization and EDID
read sequence. To be able to do this, we driving lspcon in PCON mode only,
where it can serve both HDMI1.3/HDMI1.4 sinks as well as 4k@60 capable
HDMI 2.0 sinks. So compared to previous series, there is one patch less,
as we have dropped lspcon detection patch.V3: Addressed review comments from Rodrigo
Details available with respective patch.
Quoted 8 lines
V4: Addressed review comments from Ville
Details available with respective patch.Shashank Sharma (4):
drm: Helper for lspcon indrm_dp_dual_mode
drm/i915: Add lspcon support for I915 driver
drm/i915: Parse VBT data for lspcon
drm/i915: Enable lspcon initialization
Testing these patches on my APL RVP, modesetting works fine, but after suspend-to-ram the LSPCON output stops working. Link training fails during the resume time enabling and I can't get any hotplug interrupts afterwards, or make it recover in any way.
Debugging it further I see that right after resume a DPCD read succeeds but returns corrupted values. I'm thinking that there is some delay while the LSPCON HW/FW is initializing and trying to do link training during this time gets it into the broken state. At least delaying the encoder enabling after resume by 100ms fixes things, DPCD reads return correct values and link training/modesetting will succeed.
Have you seen this on the other platforms?
The FW version I have is 1.39 as reported by DPCD 0x50A/0x50B.
--Imre
Quoted 11 lines
drivers/gpu/drm/drm_dp_dual_mode_helper.c | 103
++++++++++++++++++++++++
drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_bios.c | 49 ++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 29 ++++++- drivers/gpu/drm/i915/intel_drv.h | 13 ++- drivers/gpu/drm/i915/intel_lspcon.c | 127
++++++++++++++++++++++++++++++
include/drm/drm_dp_dual_mode_helper.h | 26 ++++++
Quoted 3 lines
8 files changed, 351 insertions(+), 2 deletions(-)create mode 100644
drivers/gpu/drm/i915/intel_lspcon.c
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx