Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2675433ybn; Thu, 26 Sep 2019 15:56:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyaFyZdng8DlYgUh6CmmUChpEhqJ7+Nd2lWntDhxfuuV19OpSAHC7WuSD6NK5U/dGeIyeF X-Received: by 2002:aa7:c555:: with SMTP id s21mr1360140edr.151.1569538599649; Thu, 26 Sep 2019 15:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569538599; cv=none; d=google.com; s=arc-20160816; b=A0UAqoVRZqnknIIvrzFLk7Gog6BTT3xaq6scf0VcnN8uqwWTlHz6kS2bVOUr5Md/Yh 0s+tN/N3V85QeVwNGeutJiXO5gG9zuNNHhiXHBnZFMYNmUNT4Wr8mW8SBAyYMsUSOuWB EXFrLqxPbaS+KNLgWwMmzAo+QKncsUujBTp/N4LLsME+tln+WLLFTi7tIupbgVXou47a ERVxDn67om3ekezfHi9bs3dDx84GwMekm19036SEv5gV4sGo2QsP1h2khzkUbv1fuH/t +id76d4A4TSLePXJgUiwmcwl9guwLIQuu8vyDxi/VIWbsHsqpDsEDgblBbKrxa1ob2or f5ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VZyaLoKYVm9n+k496cp4Aby5CNsThiW22aDA1fBqFPw=; b=ulJnhLVfHLXt9MhHY+I5oIpJQ6i5pQkovYvzM6/DYqR7WjLRrIm9eOfoFtVV6+Herk O6Wgy+mS1oCOWMOvnz+fm6REqxzH75y/R+xtIuBNjMQO3QWJoVujLWinB9A2EE+WLCyO K6rwTMrig0JT9q9HvUsstQUW3Geb5N/GkLP+Tlx54vPGK+eG0kdk6jk/MXQQNvC2VD9y UUkLUey9S1UGEdIGObheus9VBprS1UWpfQ44I9j0O2VepiZ7xWB/kygdOXGbZgCT3zQW DDfMfhIjGUmeptrv7cyXWymoX+G6CrRZGMyzjKI0dMBn6Y5HWw9ApHMEMaXvgQ2vz4Ek AXmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si401344eds.428.2019.09.26.15.56.15; Thu, 26 Sep 2019 15:56:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728913AbfIZWwT (ORCPT + 99 others); Thu, 26 Sep 2019 18:52:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38980 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728564AbfIZWwS (ORCPT ); Thu, 26 Sep 2019 18:52:18 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E80010C0931; Thu, 26 Sep 2019 22:52:18 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-34.bss.redhat.com [10.20.1.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 366CD600C1; Thu, 26 Sep 2019 22:52:17 +0000 (UTC) From: Lyude Paul To: amd-gfx@lists.freedesktop.org Cc: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Nicholas Kazlauskas , David Francis , Mario Kleiner , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] drm/amdgpu/dm/mst: Report possible_crtcs incorrectly, for now Date: Thu, 26 Sep 2019 18:51:07 -0400 Message-Id: <20190926225122.31455-6-lyude@redhat.com> In-Reply-To: <20190926225122.31455-1-lyude@redhat.com> References: <20190926225122.31455-1-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Thu, 26 Sep 2019 22:52:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit is seperate from the previous one to make it easier to revert in the future. Basically, there's multiple userspace applications that interpret possible_crtcs very wrong: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277 https://gitlab.gnome.org/GNOME/mutter/issues/759 While work is ongoing to fix these issues in userspace, we need to report ->possible_crtcs incorrectly for now in order to avoid introducing a regression in in userspace. Once these issues get fixed, this commit should be reverted. Signed-off-by: Lyude Paul Cc: Ville Syrjälä --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index b404f1ae6df7..fe8ac801d7a5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4807,6 +4807,17 @@ static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm, if (!acrtc->mst_encoder) goto fail; + /* + * FIXME: This is a hack to workaround the following issues: + * + * https://gitlab.gnome.org/GNOME/mutter/issues/759 + * https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277 + * + * One these issues are closed, this should be removed + */ + acrtc->mst_encoder->base.possible_crtcs = + amdgpu_dm_get_encoder_crtc_mask(dm->adev); + return 0; fail: -- 2.21.0