Skip to content

Commit

Permalink
drm: return if changed in drm_helper_hpd_irq_event()
Browse files Browse the repository at this point in the history
The caller may want to know whether the configuration was changed, and
if an hotplug event was sent.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Marc-André Lureau authored and Dave Airlie committed Oct 23, 2013
1 parent 74afee7 commit b8206d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,14 +1131,14 @@ void drm_kms_helper_poll_fini(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_kms_helper_poll_fini);

void drm_helper_hpd_irq_event(struct drm_device *dev)
bool drm_helper_hpd_irq_event(struct drm_device *dev)
{
struct drm_connector *connector;
enum drm_connector_status old_status;
bool changed = false;

if (!dev->mode_config.poll_enabled)
return;
return false;

mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
Expand All @@ -1163,5 +1163,7 @@ void drm_helper_hpd_irq_event(struct drm_device *dev)

if (changed)
drm_kms_helper_hotplug_event(dev);

return changed;
}
EXPORT_SYMBOL(drm_helper_hpd_irq_event);
2 changes: 1 addition & 1 deletion include/drm/drm_crtc_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static inline void drm_connector_helper_add(struct drm_connector *connector,
extern int drm_helper_resume_force_mode(struct drm_device *dev);
extern void drm_kms_helper_poll_init(struct drm_device *dev);
extern void drm_kms_helper_poll_fini(struct drm_device *dev);
extern void drm_helper_hpd_irq_event(struct drm_device *dev);
extern bool drm_helper_hpd_irq_event(struct drm_device *dev);
extern void drm_kms_helper_hotplug_event(struct drm_device *dev);

extern void drm_kms_helper_poll_disable(struct drm_device *dev);
Expand Down

0 comments on commit b8206d3

Please sign in to comment.