From b86711c6d6e20eb945fe878de98ef7c9be2c2088 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 8 Nov 2024 16:42:38 +0100 Subject: drm/client: Move public client header to clients/ subdirectory Move the public header file drm_client_setup.h to the clients/ subdirectory and update all drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-3-tzimmermann@suse.de --- include/drm/clients/drm_client_setup.h | 26 ++++++++++++++++++++++++++ include/drm/drm_client_setup.h | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 include/drm/clients/drm_client_setup.h delete mode 100644 include/drm/drm_client_setup.h (limited to 'include/drm') diff --git a/include/drm/clients/drm_client_setup.h b/include/drm/clients/drm_client_setup.h new file mode 100644 index 000000000000..46aab3fb46be --- /dev/null +++ b/include/drm/clients/drm_client_setup.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef DRM_CLIENT_SETUP_H +#define DRM_CLIENT_SETUP_H + +#include + +struct drm_device; +struct drm_format_info; + +#if defined(CONFIG_DRM_CLIENT_SETUP) +void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format); +void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc); +void drm_client_setup_with_color_mode(struct drm_device *dev, unsigned int color_mode); +#else +static inline void drm_client_setup(struct drm_device *dev, + const struct drm_format_info *format) +{ } +static inline void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc) +{ } +static inline void drm_client_setup_with_color_mode(struct drm_device *dev, + unsigned int color_mode) +{ } +#endif + +#endif diff --git a/include/drm/drm_client_setup.h b/include/drm/drm_client_setup.h deleted file mode 100644 index 46aab3fb46be..000000000000 --- a/include/drm/drm_client_setup.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: MIT */ - -#ifndef DRM_CLIENT_SETUP_H -#define DRM_CLIENT_SETUP_H - -#include - -struct drm_device; -struct drm_format_info; - -#if defined(CONFIG_DRM_CLIENT_SETUP) -void drm_client_setup(struct drm_device *dev, const struct drm_format_info *format); -void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc); -void drm_client_setup_with_color_mode(struct drm_device *dev, unsigned int color_mode); -#else -static inline void drm_client_setup(struct drm_device *dev, - const struct drm_format_info *format) -{ } -static inline void drm_client_setup_with_fourcc(struct drm_device *dev, u32 fourcc) -{ } -static inline void drm_client_setup_with_color_mode(struct drm_device *dev, - unsigned int color_mode) -{ } -#endif - -#endif -- cgit v1.2.3 From 7d2faa8dbb7055a115fe0cd6068d7090094a573d Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 8 Nov 2024 16:42:39 +0100 Subject: drm/fbdev-client: Unexport drm_fbdev_client_setup() DRM drivers invoke drm_client_setup() to set up in-kernel clients. No driver should call drm_fbdev_client_setup() directly. Therefore, unexport the symbol and move the declaration to the internal header drm_client_internal.h. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-4-tzimmermann@suse.de --- include/drm/drm_fbdev_client.h | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 include/drm/drm_fbdev_client.h (limited to 'include/drm') diff --git a/include/drm/drm_fbdev_client.h b/include/drm/drm_fbdev_client.h deleted file mode 100644 index e11a5614f127..000000000000 --- a/include/drm/drm_fbdev_client.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: MIT */ - -#ifndef DRM_FBDEV_CLIENT_H -#define DRM_FBDEV_CLIENT_H - -struct drm_device; -struct drm_format_info; - -#ifdef CONFIG_DRM_FBDEV_EMULATION -int drm_fbdev_client_setup(struct drm_device *dev, const struct drm_format_info *format); -#else -static inline int drm_fbdev_client_setup(struct drm_device *dev, - const struct drm_format_info *format) -{ - return 0; -} -#endif - -#endif -- cgit v1.2.3 From 22e5c7ae12145af13785e3ff138395d5b1a22116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 11 Nov 2024 19:09:35 +0100 Subject: drm: Add panel backlight quirks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Panels using a PWM-controlled backlight source do not have a standard way to communicate their valid PWM ranges. On x86 the ranges are read from ACPI through driver-specific tables. The built-in ranges are not necessarily correct, or may grow stale if an older device can be retrofitted with newer panels. Add a quirk infrastructure with which the minimum valid backlight value can be maintained as part of the kernel. Signed-off-by: Thomas Weißschuh Tested-by: Dustin L. Howett Reviewed-by: Mario Limonciello Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Link: https://patchwork.freedesktop.org/patch/msgid/20241111-amdgpu-min-backlight-quirk-v7-1-f662851fda69@weissschuh.net --- include/drm/drm_utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/drm') diff --git a/include/drm/drm_utils.h b/include/drm/drm_utils.h index 70775748d243..15fa9b6865f4 100644 --- a/include/drm/drm_utils.h +++ b/include/drm/drm_utils.h @@ -12,8 +12,12 @@ #include +struct drm_edid; + int drm_get_panel_orientation_quirk(int width, int height); +int drm_get_panel_min_brightness_quirk(const struct drm_edid *edid); + signed long drm_timeout_abs_to_jiffies(int64_t timeout_nsec); #endif -- cgit v1.2.3 From f2663f704d8428a7f1bacf084de460d006259f6e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 3 Dec 2024 17:17:08 +0200 Subject: drm/dp: extract drm_dp_dpcd_poll_act_handled() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. Pass timeout in as a parameter, anticipating that we can reduce the timeout for SST. v2: Clean up kernel-doc a bit Cc: Lyude Paul Reviewed-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/459fd3e96a55a8ea8ada8d27d93eaa24c235f9c1.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/display/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/drm') diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index 279624833ea9..38eea21d1082 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux, enum drm_dp_phy dp_phy, u8 link_status[DP_LINK_STATUS_SIZE]); +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms); + bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, u8 real_edid_checksum); -- cgit v1.2.3 From 3b00b53afe6047983b14de269cd0a93c612e646d Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 3 Dec 2024 17:17:09 +0200 Subject: drm/dp: extract drm_dp_dpcd_write_payload() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. v2: Clean up kernel-doc a bit Cc: Lyude Paul Reviewed-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/f626715ba4e348546770750aa3e10fac73a5cbd7.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/display/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/drm') diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index 38eea21d1082..69793815aa82 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux, enum drm_dp_phy dp_phy, u8 link_status[DP_LINK_STATUS_SIZE]); +int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux, + int vcpid, u8 start_time_slot, u8 time_slot_count); int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms); bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, -- cgit v1.2.3 From f3c03be182efccce3f6c2d8ceb35ba43e77ac128 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 3 Dec 2024 17:17:10 +0200 Subject: drm/dp: extract drm_dp_dpcd_clear_payload() SST with 128b/132b channel coding needs this too. Extract to a separate helper, independent of MST. Cc: Lyude Paul Reviewed-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/904fa73ea9ea976185062eeb493a08ffc43ed27e.1733238941.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/display/drm_dp_helper.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/drm') diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index 69793815aa82..8f4054a56039 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -569,6 +569,7 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux, int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux, int vcpid, u8 start_time_slot, u8 time_slot_count); +int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux); int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms); bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, -- cgit v1.2.3 From cb2e1c2136f71618142557ceca3a8802e87a44cd Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 4 Dec 2024 16:31:12 +0200 Subject: drm: remove driver date from struct drm_driver and all drivers We stopped using the driver initialized date in commit 7fb8af6798e8 ("drm: deprecate driver date") and (eventually) started returning "0" for drm_version ioctl instead. Finish the job, and remove the unused date member from struct drm_driver, its initialization from drivers, along with the common DRIVER_DATE macros. v2: Also update drivers/accel (kernel test robot) Reviewed-by: Javier Martinez Canillas Acked-by: Alex Deucher Acked-by: Simon Ser Acked-by: Jeffrey Hugo Acked-by: Lucas De Marchi Acked-by: Dmitry Baryshkov # msm Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1f2bf2543aed270a06f6c707fd6ed1b78bf16712.1733322525.git.jani.nikula@intel.com Signed-off-by: Jani Nikula --- include/drm/drm_drv.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/drm') diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index 1bbbcb8e2d23..1b6e59139e6c 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -401,8 +401,6 @@ struct drm_driver { char *name; /** @desc: driver description */ char *desc; - /** @date: driver date, unused, to be removed */ - char *date; /** * @driver_features: -- cgit v1.2.3