Disabling head zero leaves its previous monitor entry intact because
the inactive-head path only clears heads with a nonzero index. With
another head still active, QXL continues publishing the disabled head
as a visible monitor.
Clear head zero using the same path as the other disabled heads.
Fixes: a6d3c4d79822 ("qxl: hook monitors_config updates into crtc, not
encoder.")
Assisted-by: LLM sparse
Signed-off-by: Dillon Amburgey <[email protected]>
---
drivers/gpu/drm/qxl/qxl_display.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c
b/drivers/gpu/drm/qxl/qxl_display.c
index 51087cacff74..05de8dd3144d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -350,16 +350,13 @@ static void qxl_crtc_update_monitors_config(struct
drm_crtc *crtc,
qdev->monitors_config->count = i + 1;
if (qdev->primary_bo == qdev->dumb_shadow_bo)
head.x += qdev->dumb_heads[i].x;
- } else if (i > 0) {
+ } else {
head.width = 0;
head.height = 0;
head.x = 0;
head.y = 0;
if (qdev->monitors_config->count == i + 1)
qdev->monitors_config->count = i;
- } else {
- DRM_DEBUG_KMS("inactive head 0, skip (%s)\n", reason);
- return;
}
if (head.width == qdev->monitors_config->heads[i].width &&