mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
0464ed1a79
The drm_helper_hpd_irq_event() function is iterating over all the connectors when an hotplug event is detected. During that iteration, it will call each connector detect function and figure out if its status changed. Finally, if any connector changed, it will notify the user-space and the clients that something changed on the DRM device. This is supposed to be used for drivers that don't have a hotplug interrupt for individual connectors. However, drivers that can use an interrupt for a single connector are left in the dust and can either reimplement the logic used during the iteration for each connector or use that helper and iterate over all connectors all the time. Since both are suboptimal, let's create a helper that will only perform the status detection on a single connector. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210914101724.266570-2-maxime@cerno.tech
29 lines
922 B
C
29 lines
922 B
C
// SPDX-License-Identifier: GPL-2.0 OR MIT
|
|
|
|
#ifndef __DRM_PROBE_HELPER_H__
|
|
#define __DRM_PROBE_HELPER_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_connector;
|
|
struct drm_device;
|
|
struct drm_modeset_acquire_ctx;
|
|
|
|
int drm_helper_probe_single_connector_modes(struct drm_connector
|
|
*connector, uint32_t maxX,
|
|
uint32_t maxY);
|
|
int drm_helper_probe_detect(struct drm_connector *connector,
|
|
struct drm_modeset_acquire_ctx *ctx,
|
|
bool force);
|
|
void drm_kms_helper_poll_init(struct drm_device *dev);
|
|
void drm_kms_helper_poll_fini(struct drm_device *dev);
|
|
bool drm_helper_hpd_irq_event(struct drm_device *dev);
|
|
bool drm_connector_helper_hpd_irq_event(struct drm_connector *connector);
|
|
void drm_kms_helper_hotplug_event(struct drm_device *dev);
|
|
|
|
void drm_kms_helper_poll_disable(struct drm_device *dev);
|
|
void drm_kms_helper_poll_enable(struct drm_device *dev);
|
|
bool drm_kms_helper_is_poll_worker(void);
|
|
|
|
#endif
|