From patchwork Fri Oct 18 14:11:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 3068091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 83C129F372 for ; Fri, 18 Oct 2013 14:50:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 662E72051A for ; Fri, 18 Oct 2013 14:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 54F6C20518 for ; Fri, 18 Oct 2013 14:50:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 39A25E725A for ; Fri, 18 Oct 2013 07:50:29 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 96CA0E612D for ; Fri, 18 Oct 2013 07:12:03 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id l10so408175eei.37 for ; Fri, 18 Oct 2013 07:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=g1HtHckgy9Yh+5BUVU09uVU+yu0XO0YSY0hhsGTzQJc=; b=ia6tqSyVrb6TXaoQg4YAJ1eMwhRQQ7ZcKzf4XiL52xKwn57e62OPMKNenprnrPnUf2 XRIDmhuEdLmxAPenavYs9O8b/yqCDrdmMUkYsXTFnkDEuicgrS75eZU4IapSNlZJA0ep q8BgTNilJVKsq9q8TDDS2LPlUygcnguic5GjzDi7u6boVCClgA3cvKDUk+IBBe4dwH82 bXSqoHblonBCW2opjcwh97CrjbYMGEGK7U/b1p2TxKCUkjma15b9T4uZAVkgkKIE0gv+ 6/RTMVT2bDA9PKhx4r/fFFnmwSf4xd/AS4C4BavIUYHtdHwf1pWvzqSIFJ3JwAD7C729 TO8w== X-Received: by 10.15.64.1 with SMTP id n1mr4852392eex.15.1382105522667; Fri, 18 Oct 2013 07:12:02 -0700 (PDT) Received: from localhost (122.Red-83-45-5.dynamicIP.rima-tde.net. [83.45.5.122]) by mx.google.com with ESMTPSA id z12sm5014190eev.6.2013.10.18.07.12.00 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 07:12:01 -0700 (PDT) From: "=?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=" To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/7] drm/qxl: notify that the monitor config changed Date: Fri, 18 Oct 2013 16:11:29 +0200 Message-Id: <1382105493-2152-3-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1382105493-2152-1-git-send-email-marcandre.lureau@redhat.com> References: <1382105493-2152-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 Cc: airlied@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drm_helper_hpd_irq_event() only notifies when the connector status changed. However, Spice monitor config can change while the connector is connected, to support arbitrary resolution. Do an hotplug event if it wasn't done by drm_helper_hpd_irq_event(). Signed-off-by: Marc-André Lureau --- drivers/gpu/drm/qxl/qxl_display.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 835caba..c2cc9b5 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -107,7 +107,12 @@ void qxl_display_read_client_monitors_config(struct qxl_device *qdev) qxl_io_log(qdev, "failed crc check for client_monitors_config," " retrying\n"); } - drm_helper_hpd_irq_event(qdev->ddev); + + if (!drm_helper_hpd_irq_event(qdev->ddev)) { + /* notify that the monitor configuration changed, to + adjust at the arbitrary resolution */ + drm_kms_helper_hotplug_event(qdev->ddev); + } } static int qxl_add_monitors_config_modes(struct drm_connector *connector)