drm/bridge: add it6505 driver
Subsystems (4)
PATCH v8 1/1 drm/bridge: add it6505 driver
This adds support for the iTE IT6505.
This device can convert DPI signal to DP output.
From: Allen Chen <[email protected]>
v7->v8:
fixed "checkpatch --strict" error
remove unused variable *edid
remove mode_set() callback
Documenting the individual bits of the interrupt mask values change it6505_dpcd_write parameter from unsigned long to u8
This patch depends on https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
--- drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6505.c | 3333 +++++++++++++++++++++++++++ 3 files changed, 3342 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ite-it6505.c
drivers/gpu/drm/bridge/Kconfig +8 -0
@@ -74,6 +74,14 @@ config DRM_DISPLAY_CONNECTOR on ARM-based platforms. Saying Y here when this driver is not needed will not cause any issue. +config DRM_ITE_IT6505 + tristate "ITE IT6505 DisplayPort bridge" + depends on OF + select DRM_KMS_HELPER + select EXTCON + help + ITE IT6505 DisplayPort bridge chip driver. + config DRM_LONTIUM_LT8912B tristate "Lontium LT8912B DSI/HDMI bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -4,6 +4,7 @@ obj-$(CONFIG_DRM_CHIPONE_ICN6211) += chipone-icn6211.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o +obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o
drivers/gpu/drm/bridge/ite-it6505.c new file +3333 -0
2,979 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
Quoted 9 lines · allen
This adds support for the iTE IT6505.
This device can convert DPI signal to DP output.From: Allen Chen <[email protected]>
Tested-by Hsin-yi Wang <[email protected]>Signed-off-by Hermes Wu <[email protected]>Signed-off-by Allen Chen <[email protected]>
--- <-- Add this line next time.
Add the change logs below this line so that they're not mixed with commit messages.
Quoted 23 lines
v7->v8:
fixed "checkpatch --strict" error
remove unused variable *edid
removemode_set()callback
Documenting the individual bits of the interrupt mask values changeit6505_dpcd_writeparameter from unsigned long to u8This patch depends on https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
--- drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6505.c | 3333 +++++++++++++++++++++++++++ 3 files changed, 3342 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ite-it6505.cdrivers/gpu/drm/bridge/Kconfig +0
-0@@ -74,6 +74,14 @@ config DRM_DISPLAY_CONNECTOR on ARM-based platforms. Saying Y here when this driver is not needed will not cause any issue.
<snip>
drivers/gpu/drm/bridge/Kconfig
Quoted 7 lines
drivers/gpu/drm/bridge/Kconfig +7
-0+ + /* Register aux channel */ + it6505->aux.name = "DP-AUX"; + it6505->aux.dev = dev; + it6505->aux.transfer = it6505_aux_transfer; + + err = drm_dp_aux_register(&it6505->aux);
drm_dp_aux_register() checks if aux->drm_dev is null. Assign this otherwise you'll see warnings.
Quoted 4 lines
drivers/gpu/drm/bridge/Kconfig +4
-0+ if (err < 0) { + dev_err(dev, "Failed to register aux: %d", err); + return err; + }
<snip>
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi allen,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.14-rc5 next-20210810]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/allen/drm-bridge-add-it6505-driver/20210810-193211 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9a73fa375d58fee5262dd16473c8e7522bdf44de config: x86_64-allyesconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://github.com/0day-ci/linux/commit/231426fd292ff0e8bdacd89be335c257fc57b6ad git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review allen/drm-bridge-add-it6505-driver/20210810-193211 git checkout 231426fd292ff0e8bdacd89be335c257fc57b6ad # save the attached .config to linux build tree make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_bridge_atomic_enable':
drivers/gpu/drm/bridge/ite-it6505.c:2906:15: error: implicit declaration of function 'drm_bridge_new_crtc_state'; did you mean 'drm_atomic_get_new_crtc_state'? [-Werror=implicit-function-declaration]
2906 | crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_get_new_crtc_state
>> drivers/gpu/drm/bridge/ite-it6505.c:2906:13: warning: assignment to 'const struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2906 | crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
| ^cc1: some warnings being treated as errors
vim +2906 drivers/gpu/drm/bridge/ite-it6505.c
2888
2889 static void it6505_bridge_atomic_enable(struct drm_bridge *bridge,
2890 struct drm_bridge_state *old_state)
2891 {
2892 struct it6505 *it6505 = bridge_to_it6505(bridge);
2893 struct device *dev = &it6505->client->dev;
2894 struct drm_atomic_state *state = old_state->base.state;
2895 struct hdmi_avi_infoframe frame;
2896 const struct drm_crtc_state *crtc_state;
2897 const struct drm_display_mode *mode;
2898 struct drm_connector *connector;
2899 int ret;
2900
2901 DRM_DEV_DEBUG_DRIVER(dev, "start");
2902
2903 connector = drm_atomic_get_new_connector_for_encoder(state,
2904 bridge->encoder);
2905
> 2906 crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
2907 mode = &crtc_state->mode;
2908 ret = drm_hdmi_avi_infoframe_from_display_mode(&frame,
2909 connector,
2910 mode);
2911 if (ret)
2912 dev_err(dev, "Failed to setup AVI infoframe: %d", ret);
2913
2914 it6505_update_video_parameter(it6505, mode);
2915
2916 ret = it6505_send_video_infoframe(it6505, &frame);
2917
2918 if (ret)
2919 dev_err(dev, "Failed to send AVI infoframe: %d", ret);
2920
2921 it6505_int_mask_enable(it6505);
2922 it6505_video_reset(it6505);
2923 }
2924
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Hi
It has been about two months since I posted v8
Consider this a gentle ping.
Just wondering if the set needs additional work and I will fix and upstream again.
-----Original Message-----
From: Allen Chen (陳柏宇)
Sent: Tuesday, August 10, 2021 7:11 PM
Cc: Allen Chen (陳柏宇); Hsin-Yi Wang; Kenneth Hung (洪家倫); Hermes Wu (吳佳宏); Jau-Chih Tseng (曾昭智); Hsin-yi Wang; Hermes Wu (吳佳宏); Andrzej Hajda; Neil Armstrong; Robert Foss; Laurent Pinchart; Jonas Karlman; Jernej Skrabec; David Airlie; Daniel Vetter; Matthias Brugger; open list; open list:DRM DRIVERS; moderated list:ARM/Mediatek SoC support; moderated list:ARM/Mediatek SoC support
Subject: [PATCH v8] drm/bridge: add it6505 driver
This adds support for the iTE IT6505.
This device can convert DPI signal to DP output.
From: Allen Chen <[email protected]>
v7->v8:
fixed "checkpatch --strict" error
remove unused variable *edid
remove mode_set() callback
Documenting the individual bits of the interrupt mask values change it6505_dpcd_write parameter from unsigned long to u8
This patch depends on https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
--- drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/ite-it6505.c | 3333 +++++++++++++++++++++++++++ 3 files changed, 3342 insertions(+) create mode 100644 drivers/gpu/drm/bridge/ite-it6505.c
drivers/gpu/drm/bridge/Kconfig +8 -0
@@ -74,6 +74,14 @@ config DRM_DISPLAY_CONNECTOR on ARM-based platforms. Saying Y here when this driver is not needed will not cause any issue. +config DRM_ITE_IT6505 + tristate "ITE IT6505 DisplayPort bridge" + depends on OF + select DRM_KMS_HELPER + select EXTCON + help + ITE IT6505 DisplayPort bridge chip driver. + config DRM_LONTIUM_LT8912B tristate "Lontium LT8912B DSI/HDMI bridge" depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
@@ -4,6 +4,7 @@ obj-$(CONFIG_DRM_CHIPONE_ICN6211) += chipone-icn6211.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o +obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o
drivers/gpu/drm/bridge/ite-it6505.c new file +3333 -0
2,979 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.25.1 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Part of the diff is not shown here. View the raw message.