Some lost drm patches v2
Subsystems (2)
Updated series with:
- Reviews applied,
- Drop a patch that would conflict with Ville's latest changes,
- Drop Chris (Cummins)'s patch as he rebased it on top of drm-next and sent it back himself,
- Add a suggestion from Chris (Wilson) to not repeat the message in the poll handler. I did not do that for the irq helper as it might be useful to detect spurious interrupts.
Signature · 1 line
Damien
PATCH 1/4 drm: Add missing break in the command line mode parsing code
As we parse the string given on the command line one char at a time, it seems that we do want a break at every case.
--- drivers/gpu/drm/drm_modes.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_modes.c +1 -0
@@ -1143,6 +1143,7 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option, was_digit = false; }else goto done; +break ; case '0' ... '9': was_digit = true;break ;
Signature · 1 line
1.8.1.4
PATCH 2/4 drm: Make the HPD status updates debug logs more readable
In reply to Damien LespiauInstead of just printing "status updated from 1 to 2", make those enum numbers immediately readable.
v2: Also patch output_poll_execute() (Daniel Vetter)
v3: Use drm_get_connector_status_name (Ville Syrjälä)
--- drivers/gpu/drm/drm_crtc.c | 1 + drivers/gpu/drm/drm_crtc_helper.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_crtc.c +1 -0
@@ -246,6 +246,7 @@ char *drm_get_connector_status_name(enum drm_connector_status status)else return "unknown" ; } +EXPORT_SYMBOL (drm_get_connector_status_name);/** * drm_mode_object_get - allocate a new modeset identifier
drivers/gpu/drm/drm_crtc_helper.c +6 -4
@@ -1005,10 +1005,11 @@ static void output_poll_execute(struct work_struct *work)continue ; connector->status = connector->funcs->detect (connector, false); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] status updated from %d to %d\n" , +DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] status updated from %s to %s\n" , connector->base.id,drm_get_connector_name (connector), - old_status, connector->status); +drm_get_connector_status_name (old_status), +drm_get_connector_status_name (connector->status));if (old_status != connector->status) changed = true; }
@@ -1083,10 +1084,11 @@ void drm_helper_hpd_irq_event(struct drm_device *dev) old_status = connector->status; connector->status = connector->funcs->detect (connector, false); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] status updated from %d to %d\n" , +DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] status updated from %s to %s\n" , connector->base.id,drm_get_connector_name (connector), - old_status, connector->status); +drm_get_connector_status_name (old_status), +drm_get_connector_status_name (connector->status));if (old_status != connector->status) changed = true; }
Signature · 6 lines
1.8.1.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm: Don't prune modes loudly when a connector is disconnected
In reply to Damien Lespiaudrm_helper_probe_single_connector_modes() is responsible for pruning the previously detected modes on a disconnected connector. We don't really need to log, again, the full list of modes that used to be valid when connected.
--- drivers/gpu/drm/drm_crtc_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc_helper.c +3 -1
@@ -121,6 +121,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, connector->helper_private;int count =0 ;int mode_flags =0 ; +bool verbose_prune = true;DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id,drm_get_connector_name (connector));
@@ -149,6 +150,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] disconnected\n" , connector->base.id,drm_get_connector_name (connector));drm_mode_connector_update_edid_property (connector,NULL ); + verbose_prune = false; goto prune; }
@@ -182,7 +184,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, } prune: -drm_mode_prune_invalid (dev, &connector->modes, true); +drm_mode_prune_invalid (dev, &connector->modes, verbose_prune);if (list_empty (&connector->modes))return 0 ;
Signature · 1 line
1.8.1.4
PATCH 4/4 drm: Only print a debug message when the polled connector has changed
In reply to Damien Lespiau--- drivers/gpu/drm/drm_crtc_helper.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/drm_crtc_helper.c +13 -6
@@ -1007,13 +1007,20 @@ static void output_poll_execute(struct work_struct *work)continue ; connector->status = connector->funcs->detect (connector, false); -DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] status updated from %s to %s\n" , - connector->base.id, -drm_get_connector_name (connector), -drm_get_connector_status_name (old_status), -drm_get_connector_status_name (connector->status)); -if (old_status != connector->status) +if (old_status != connector->status) { +const char *old, *new; + + old =drm_get_connector_status_name (old_status); + new =drm_get_connector_status_name (connector->status); + +DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] " +"status updated from %s to %s\n" , + connector->base.id, +drm_get_connector_name (connector), + old, new); + changed = true; + } }mutex_unlock (&dev->mode_config.mutex);
Signature · 1 line
1.8.1.4