From patchwork Thu Sep 13 11:58:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10599319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97CED921 for ; Thu, 13 Sep 2018 11:59:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 874102A9F0 for ; Thu, 13 Sep 2018 11:59:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A2C52AA0A; Thu, 13 Sep 2018 11:59:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2569B2A9F0 for ; Thu, 13 Sep 2018 11:59:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 607FE6E66E; Thu, 13 Sep 2018 11:59:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680040.outbound.protection.outlook.com [40.107.68.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id A3B2B6E66E for ; Thu, 13 Sep 2018 11:59:17 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.11; Thu, 13 Sep 2018 11:59:12 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com Subject: [PATCH -fixes 1/5] drm/vmwgfx: don't check for old_crtc_state enable status Date: Thu, 13 Sep 2018 13:58:33 +0200 Message-Id: <20180913115837.7746-1-thellstrom@vmware.com> X-Mailer: git-send-email 2.19.0.rc1 MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: PR0P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::15) To SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8e12366-f416-4a4c-835d-08d6197052c8 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4589; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 3:rvP4XYUfEpuIoaMM8KwEsQDansk+Agn+nXvAijPT04ENOTcf/MAH5555o1zRpI1jPJzS6hkSfde6W2dqITjemA9HSD2aHsosItsJRiQdgtgWWNG8+ZKXfrNe8bpZE0CaOOM+ZJwLqbpJVNlaczQ5NILNIcPvktAhQUNSpbTJQEGMyyTYMaOWZ9K9Y1RH7SCjY/RuVnoTWBgIwB1XyucJmDgJFRWWmOm09XgRkI8oFC+0YdLw3601lsUgpV623ZmM; 25:jQ3FMawqO8fky8IULsXzFcB0gAUtvpNQP6lV6ofRp2NR5AVOe7vXxIbbBl6PorrxJ32AsqO6ivZNSEDBSQnfymHlv0lNS8gnL0YTuWoh8at9Pu5pqQY2QIR9OsCgHZD121ENbHPrm7FnutfXyJ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QJIcaQq/+5GVLTe8qYpF/fKk9CIl6UEZmehXdULOulWBk4i1WFuCt2cAciUn/wo3IGx5q5tZk9q6cPaAwXKB121HKHWHwChY+r5c=; 4:JWzNpoMbk7VkPSrZvJIbJHSEaT0esil9KtUvO8fmDIavQq6NEuwPWPgz990H0mNyL6TW03cGqCtdcc2KxiL+Y4wOx7AkygNC6/X28O2Y/GuK19Xubya3yrPjlMoqwHQNmWSyv0OK62UXdSJEfAZDN3qTbqwuRuuLo2lJ28IYwv+shGJplis23sGo4bncG0o50bNqFpvOXEqq8ph6q1DGKgP7ZhieUoHBhB0GKSeLzqZdBh2nmz7lJvSqC+qm3n+moBYz3PphTHxl9WQl9RjC13/W+qR7fboCX4hujh9rCelP6rEY22olfNlq0RhYz90E X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:SN6PR05MB4589; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4589; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(199004)(189003)(2906002)(6512007)(81156014)(5660300001)(386003)(106356001)(105586002)(6506007)(53936002)(2870700001)(26005)(6666003)(107886003)(6636002)(97736004)(36756003)(16526019)(51416003)(186003)(486006)(50466002)(81166006)(52116002)(956004)(8676002)(476003)(6486002)(48376002)(478600001)(316002)(2616005)(68736007)(66066001)(305945005)(4326008)(14444005)(1076002)(50226002)(47776003)(8936002)(86362001)(6116002)(7736002)(54906003)(3846002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4589; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4589; 23:PvZYFbpVpFwArXVFJIf4PXTyiv5LQ/oDOWvHvB7wg?= 3p04dOywFROE4k/fhkUgbhcNgHI5hw+C3jgpXxgssP0W9HGj+4CZlQQjMTp7UTDFLkAQP4RbZPZYdq3cUTGUoEdeDrJz9Feqf3+v9t6XAcrlx16CxpgBJ3/6ruD7l1rgXLJELZLCGg7zSCuc5g3JNXz5Q9nCDAlU1YYKgKK7bnUaYcWXr7iFZBu2DO8bxTFSZ7HNSucYtnejLqK1vBj7xCwelmDoh3Da17FjEJDf+IWMEi3BMia+Pi+LkkhF3D28iHJRjXnuKghScdRluy3u5oLIBHr8WfaQKKZeNd1FmYjuIR6Mi6Dg3GFFYMKPrsyA1hQwi+0DbV8A+3XBAHwxfoqibKFHcfSGPpN45WlA0muNvfCQI/e/WeMeELm746h0zC0FHy8QdqJDUXr9visyLY77cqkqehfFpTx28e/CBYMRNCc5H7okJ4HiLpQGp7zl0XSDrV8ZPIrYuw2+rjY/Yms+C48ddfzBsNCgaVSkjr61T9ftwa/Su+je9Scj99iyvIU92Jly5mighvN89uTP70CSsZ2w8bGJxqIxOJhYrzrKsxVB69P/UBF5lizBOzEiq7U+wvyZnUjkrLt2CVhl5y+6MUdh6zDS5fjv1EVCnVc5ItSGxNxLYBLjZhiZ8zvi2fz6+DpkJ2M/hfriNSGUdhgSVggcXSToIh9EBJ+GuAUh5F/+iO2HmF81O4+m3BKVgTl0tPYkrvy2mAq6C7w+V4jYa3frPpX4ximv49+oINbqzSdN1Y+jP9lCWsqh69wloOeFjlHPFzwXd8DSi9K4RhMFiZOCHg3IO/6JLyvJJA/Pbs8q97uNkiYnzZva/v1P+FrtMveticYQ1gz0faXF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TzGcn56vVUlpAPC7S1fQBg2sIY1c7EygwIMw+pCzs5KLIUGqvofbpzsEHIO81ecaYoRBf1bkV5LL4zznj4TtLVlPPBOQ0p7oQrsBnC6QoRLDhMmoEY/XCXGlywII2ppeudSxREiaIyHpdvzRgx6CrbQ==; 5:91fFytb4693t0qzwGapL8gcb+u3K9Z9K5njiezNb4px/WVyuCDW+Y74oawVeRSOrW1Y5ipVx98EGIgKGWeJcrBdm+pu+Y0c2RfMV87I8LnqeSXPBDcZnUfHTRhcEH2llddnA9Hq4T1WA9+tpPADS5Uznwtm/whwmpx791o+wils=; 7:Xb0UlW/XQlwZL6Ovxp+qKeXy+qYcuT5bPpTZ25729kW4+l6SxEY6e/SAW6tDg19O8HtILtERRRaWDcmLrj6jcjrOnOUy65ak26XxSfmiQa8a2nkEyUPlGRtT0H5VxNhhkG9z9hjorHkw2ggevR7VODf64qE/mi4RF71T7Xru33KuSEL4zvmaU+Y4rrOVNMm/Ttc+PgWlOuAUZKDdyUZK5DKcrO/GSQN6ypnCuUM4c9OS+13lYpUlBdTqo50Tx+MH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:CitmVV0e9QohZCqajysToD0zG2aVr98FhBzscthBlMAY/bgG7pS5DTKaMuSdcq9yZHgvPbNNZoDkG/D848+BM5FFIpxMzwzxXKVDJLPLJBpAGth/bdu/adbOW//seUr1qfDnROZT6oK8549d3YO6pOyRg7AZhSgemW+48Kjv7FI= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 11:59:12.5020 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8e12366-f416-4a4c-835d-08d6197052c8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4589 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pv-drivers@vmware.com, Thomas Hellstrom , Deepak Rawat Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Deepak Rawat During atomic check to prepare the new topology no need to check if old_crtc_state was enabled or not. This will cause atomic_check to fail because due to connector routing a crtc can be in atomic_state even if there was no change to enable status. Detected this issue with igt run. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 23beff5d8e3c..636b962849c8 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -1615,7 +1615,7 @@ static int vmw_kms_check_topology(struct drm_device *dev, struct drm_connector_state *conn_state; struct vmw_connector_state *vmw_conn_state; - if (!new_crtc_state->enable && old_crtc_state->enable) { + if (!new_crtc_state->enable) { rects[i].x1 = 0; rects[i].y1 = 0; rects[i].x2 = 0; From patchwork Thu Sep 13 11:58:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10599321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB90714BD for ; Thu, 13 Sep 2018 11:59:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBA592AA0A for ; Thu, 13 Sep 2018 11:59:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C02E72AA28; Thu, 13 Sep 2018 11:59:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 61D312AA0A for ; Thu, 13 Sep 2018 11:59:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DAF96E675; Thu, 13 Sep 2018 11:59:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680040.outbound.protection.outlook.com [40.107.68.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 145AC6E66E for ; Thu, 13 Sep 2018 11:59:18 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.11; Thu, 13 Sep 2018 11:59:14 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com Subject: [PATCH -fixes 2/5] drm/vmwgfx: limit screen size to stdu_max during check_modeset Date: Thu, 13 Sep 2018 13:58:34 +0200 Message-Id: <20180913115837.7746-2-thellstrom@vmware.com> X-Mailer: git-send-email 2.19.0.rc1 In-Reply-To: <20180913115837.7746-1-thellstrom@vmware.com> References: <20180913115837.7746-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: PR0P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::15) To SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb469e09-270c-4a1c-8f9a-08d6197053c1 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4589; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 3:8TTv8KZIT84HdGDnPflO+u94BH8gsI6VxhOblt9qouZqGmQFil1N2P3/4E3wd9FD7omER0d4h4+F5ebBsJbZbXXXCow1+LTEgLXZOiKhltu5rI1mIrOv/rhDKDKl91JbUmb7tbTTe2tA7gPtEJlT4p6BDhgCYrYpRa5uyk4S5gLyUYFIzV655021acYmXg+Lte2+pV2EX8yEIYwomOVvoFgz1LySpFaCbYyrCU5oh+borsdmEeY/1Hu/zm3n2KSD; 25:Fc4XDPtfsCdN511PcAT/PljUiK4efVVfqyMi3tSp8Ro5WgduX4HSVfd9Levzao4laQiBqtJr9mVMA20fM/cQgPzKY5zLBE0VuDVUmR6rCdlvl4Etar4lsJyez3h/3iAMCBBDBWNP7tmCSWIF8sozcWlKSidpWDRvLvrA8GZN/PV61Itz/1JdkYMZa6HuzuO4hpYIJVtmvOOCZM1LKTo+yQqXSYMIaaNBJpNMWJ6TTiejK2P3W7dWp8b0xqP5tplgDtgqrlK+b6WHd2q7Hhwpbugvjvz6s+0cIqapJh1f76J7ig6PeQYDSAnqz36zftevavJqB1AHKEMOFqW9c8110w==; 31:+Of4PwAh7jvHN3Gjgu5Lv9+NR0XEF+ftMZKF5/WpVEHX7v9ad7heOFUC02sqqY6XG3P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ZDgmOtRWcl+ywsUi4X1KHsH1MxXscSNzq2+V6ohnLY3fxDyRd41HeEz9+Zd475og1eUrNWKC+ycGhGbWU0iLr2jxYVIqlNIwhcwAldqQqJB4g7hQAzFeDOj0OxjnGZY07BnTmQPsNDxmzrUeB6f8+Ajs2LHr3GNRgGEvBiOA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:SN6PR05MB4589; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4589; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(199004)(189003)(2906002)(6512007)(81156014)(5660300001)(386003)(106356001)(105586002)(6506007)(53936002)(2870700001)(26005)(6666003)(107886003)(6636002)(97736004)(36756003)(16526019)(51416003)(186003)(486006)(76176011)(11346002)(50466002)(81166006)(52116002)(956004)(8676002)(446003)(476003)(6486002)(48376002)(478600001)(316002)(2616005)(68736007)(66066001)(305945005)(4326008)(14444005)(1076002)(50226002)(47776003)(8936002)(86362001)(6116002)(7736002)(54906003)(3846002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4589; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4589; 23:p8fBfHIa2PavdOmPMntIfTkO5aw4Oy1c15o/h1yGG?= eaBt39M5m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QKDoCuwsURUCCT0zsr4aZ9Zf6t/x+a4vYbMBT16SeaexSLChG2nPdrkoPuGtJdnCWRZIpms7r3/VFgVpDndq+djYKx8FrjJIHPE3Z02WWBVcO1an2fRXe3Xh1YarXulIkkRhzoo=; 7:rUeAbUr1XaDWxF8mbAU2xnl+26kU9xzqYPErcINoqn5gTzXbnYmO8rSzCTqKnPd7XQiTDgLhoG5O/fgl3n1cy8N1i8UIyHrQ//oU1GaxFVJ2TziL9kbMnIQQobhqezmHQ/YmhciXvrS6ESdCc4DQpdCD/1IlokaR0EXSWr/fDXvekUjVhlw6Q17/iXflqCdzKwCl/TfMzIW+YZM+98P+v+PvIkTW5Z2Ns3BUIKlhyeRYoaNR8lawBsRvMC43JwL3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:JfTImTMii9TA2/5k9Ld8UtmFMxksQMjOR8LctCTA7FeCHZE7LvEtuSUG4Ph/VskSIrZ1uoLWAXpuvGen3QMgbcm8pgVl8Xneftk52hQ6pC/2+FLy9c49ZymABHXsC0QWCe3E4tOkkNUbTxXqxIHLAxkTFCagPmqOIel5sSIdWe0= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 11:59:14.1332 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb469e09-270c-4a1c-8f9a-08d6197053c1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4589 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pv-drivers@vmware.com, Thomas Hellstrom , Deepak Rawat Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Deepak Rawat For STDU individual screen target size is limited by SVGA_REG_SCREENTARGET_MAX_WIDTH/HEIGHT registers so add that limit during atomic check_modeset. An additional limit is placed in the update_layout ioctl to avoid requesting layouts that current user-space typically can't support. Also modified the comments to reflect current limitation on topology. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 30 +++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 636b962849c8..12a41b039167 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -1512,21 +1512,19 @@ static int vmw_kms_check_display_memory(struct drm_device *dev, struct drm_rect *rects) { struct vmw_private *dev_priv = vmw_priv(dev); - struct drm_mode_config *mode_config = &dev->mode_config; struct drm_rect bounding_box = {0}; u64 total_pixels = 0, pixel_mem, bb_mem; int i; for (i = 0; i < num_rects; i++) { /* - * Currently this check is limiting the topology within max - * texture/screentarget size. This should change in future when - * user-space support multiple fb with topology. + * For STDU only individual screen (screen target) is limited by + * SCREENTARGET_MAX_WIDTH/HEIGHT registers. */ - if (rects[i].x1 < 0 || rects[i].y1 < 0 || - rects[i].x2 > mode_config->max_width || - rects[i].y2 > mode_config->max_height) { - DRM_ERROR("Invalid GUI layout.\n"); + if (dev_priv->active_display_unit == vmw_du_screen_target && + (drm_rect_width(&rects[i]) > dev_priv->stdu_max_width || + drm_rect_height(&rects[i]) > dev_priv->stdu_max_height)) { + DRM_ERROR("Screen size not supported.\n"); return -EINVAL; } @@ -2376,6 +2374,7 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct vmw_private *dev_priv = vmw_priv(dev); + struct drm_mode_config *mode_config = &dev->mode_config; struct drm_vmw_update_layout_arg *arg = (struct drm_vmw_update_layout_arg *)data; void __user *user_rects; @@ -2421,6 +2420,21 @@ int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, drm_rects[i].y1 = curr_rect.y; drm_rects[i].x2 = curr_rect.x + curr_rect.w; drm_rects[i].y2 = curr_rect.y + curr_rect.h; + + /* + * Currently this check is limiting the topology within + * mode_config->max (which actually is max texture size + * supported by virtual device). This limit is here to address + * window managers that create a big framebuffer for whole + * topology. + */ + if (drm_rects[i].x1 < 0 || drm_rects[i].y1 < 0 || + drm_rects[i].x2 > mode_config->max_width || + drm_rects[i].y2 > mode_config->max_height) { + DRM_ERROR("Invalid GUI layout.\n"); + ret = -EINVAL; + goto out_free; + } } ret = vmw_kms_check_display_memory(dev, arg->num_outputs, drm_rects); From patchwork Thu Sep 13 11:58:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10599323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 099EE921 for ; Thu, 13 Sep 2018 11:59:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDC522AA1C for ; Thu, 13 Sep 2018 11:59:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1E4A2AA29; Thu, 13 Sep 2018 11:59:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 999352AA1C for ; Thu, 13 Sep 2018 11:59:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A5C06E673; Thu, 13 Sep 2018 11:59:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680069.outbound.protection.outlook.com [40.107.68.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id B46276E676 for ; Thu, 13 Sep 2018 11:59:20 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.11; Thu, 13 Sep 2018 11:59:15 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com Subject: [PATCH -fixes 3/5] drm/vmwgfx: limit mode size for all display unit to texture_max Date: Thu, 13 Sep 2018 13:58:35 +0200 Message-Id: <20180913115837.7746-3-thellstrom@vmware.com> X-Mailer: git-send-email 2.19.0.rc1 In-Reply-To: <20180913115837.7746-1-thellstrom@vmware.com> References: <20180913115837.7746-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: PR0P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::15) To SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 556b602e-8eb0-47fe-2a60-08d6197054b8 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4589; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 3:lPkzC4iigt8f+jo4Oo45bT1WfjyUaFy+dqpVTvmrms2moSHN/OBNczZR8pr34KHNybo3KgVeBETrhy/1VGDXgLb/b9vOZ6Z6xzg3ahud+XkFOakaDOk1L83jMLw3x9kV0y3uEHZP3ebct4+/HuWA58QAjgbfdtVyrlEpSf3XQTHwqYaTgSpTUq9Uq63fkqUDXeUdKIe4UyD4ZCN7nj3Vft49ouCEmzlLQk9cYGcUhVulLGJ/iIapm5OySWudsLR0; 25:UQXYkbvPfwAYd/QyVjfSVorgrDd+UhmOrSPZqNbBb5OxkytEQsWbm0uzPwC+KEluJq6mKp41bNoIeT6Ip1lo3YKRepEolAQzP+yGMwa3ZNw53NW50ujSNq9ZNXM2Mgrbj5QmgZ9GP3alzY2/wn30uFybEFsP3iOwPeSSlKi4+HuuTj5cTwiqYe6ERTdIjKWZQmKmGqF3lMcK5GJ3LFWukStsZeVaO3tfqppZRkClGqbaGTB6h4djD7R2GnwhAYhsltnyn/0glkk90BKK71TKj+KvrIe5YpW2V/ov5qB/Q4XIDPZGSjpw21kBROOOmgPr+korvVj4aBjnBEgBIorIlw==; 31:iqrXdt1dZeVhHNANMNge5/w+GdcwDKE3DqJeB94OoEKRlXj+0u9xAGQf1YucoXuY8n97uyJ4Qb6vAFyzzH1S+zt9YkES2J2XsV1Gsimea5cEieu2k2jCZHNE/BeSZfgL1rrK1w0a/khxmsags6yN5pj/hlwoYKQnktqNCcH+sDFvgJ73HKTtYNThMgJKoF50luCwRYLXFRJ+5ZWxygAwZPVgdGqdp8YW3EdoLBeE6+M= X-MS-TrafficTypeDiagnostic: SN6PR05MB4589: X-LD-Processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr BCL: 0 X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:qUAH41CrtSrDryE2aTMT9gRwkOrEy6/K3H+jgEQhLbTsWGa+KESxBL+M2OQ0Yjdto9AEbmK8BTPKJiJlps04Hpa8BIaHfds6CXOkBK2vzMwV2S/rBoXYTGI3NmV7XfUsOq9n0GiePEqxwKT8CF0ZrLwxVwe4oxSAntmeRanmq6HQvBt9Q5cVdUyr0+xNhPANKdujwvAsvRdt6QnaCtEqe11/mmnB90Wj3qkPqUzvgcbb0jJi27JXkCSDB8B305UAOun7Vjsu2EYhLSa5oWAXLXxtYriyuBYJ1FgRdi4YjW8aHO8ooqsdvVFx0NV5TIdXCTbPrKclziY1jd3nOd0P7pL2firtTbym50F13gWk3IoibohcAc5ww1uGApOcsA9fptxdAI2BKDXHTjzKa1E1QEDFb4fKYhzol3gE8PT3Yp848JTfgETRf9VKS0rTex+uFOWJDCKigKyvFJamykjNxWW2ofjMQVcYg5/ijhT71onjHo8tUIP8xoWtcCt+gs9wL2UXEqKXOeGmdzk6arzzdno5UnoCDX2PsLuQdMQPT7EB7GbakR33H0n1BsHai37Lf97r5CU3C/mWMsrEAA3SOWq/Iyi4e6HF4iqYCnp/Y6A=; 4:WjeJI9Pq2hXhR53LQdmYOex5FGceGbJqmYoyHN6GSyst75IfKyzlhGKo+UCagteEvFleRTgXLixcCtqu1utz533ndrBjkZO90JEoIfw1R7TLpUW6ytuo+GRM8WJuloU/JEzsCmO9tDMbORFaGOpzM9TcfgJJRd7U2PuVZZORvsFQaRYs17BMyfvqJQAP78FP+jtVSKpRob3aAjLXGJFemdyJGU/Ts5mBwv8qo+eCEqsMUudQbzAGdVdhsoqSEcgG8rvQoeDdDnyeCZxTeeIolUXP7aZllnFcqS44Y5pQAn1W++6T+RZ7T0N5Li5Vyho1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:SN6PR05MB4589; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4589; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(199004)(189003)(2906002)(6512007)(81156014)(5660300001)(386003)(106356001)(105586002)(6506007)(53936002)(2870700001)(26005)(6666003)(107886003)(6636002)(97736004)(36756003)(16526019)(51416003)(186003)(486006)(76176011)(11346002)(50466002)(81166006)(52116002)(956004)(8676002)(446003)(476003)(6486002)(48376002)(478600001)(316002)(2616005)(68736007)(66066001)(305945005)(4326008)(14444005)(1076002)(50226002)(47776003)(8936002)(86362001)(6116002)(7736002)(54906003)(3846002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4589; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4589; 23:nppI1MCbFT8QEDTyZCOvATuH63lPBHzKIQmh+KVta?= n8DrkvcBkkmTcmzBibRSOCvKF0fn6ZnwmFxGpEb7h3c+VvKIn7E2d+k3Zu2iE49h0Zxa6a8dw9JaeJC/GunjEvOMkeJWvHPYkF3oTYU6PR1IRp1JQ8ibGD1nezI5YHV6rpZODouWqO9saXUbvFZZgCM6o3FAt8VnFkQGZ5vREWBdOgbwu++Z3hixtl2hGfEKcHxsCV932oLAmTPfEkLMHNNr9afnO2B5IO8SvlTc3OXDi4hAmHnOReSkNqPakQxCx1EnmTqZpQnaUBnSRyax/fBqfmzgLjhQd2r0NS3my1kXzt2VK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BmmgADqCyHfXigegAPLGpzADlV2eRAgtcp4C2mHEic02zM2UJ7cCfHNanViI6rqJ08/MCWMerpP6DjfpKxSL6Zeb8NY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:4x4sU3bzBXNEpb/GpfTuV6IOheGjsiKA3Y3YYMweiF4MxXIDAH/T+bCagMrXVwQ8dY/waeTppWJtEZ17OZ4Z/bySlbM1gBdwHgaCbA9YUQoKxQdcOBLd2IJZyGDRnMng7OixVi4QgA1yuRn+gqAjCv/CKIrxgAGyVw/141nXy8I= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 11:59:15.7493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 556b602e-8eb0-47fe-2a60-08d6197054b8 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4589 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pv-drivers@vmware.com, Thomas Hellstrom , Deepak Rawat Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Deepak Rawat For all display units, limit mode size exposed to texture_max_width/ height as this is the maximum framebuffer size that virtual device can create. Signed-off-by: Deepak Rawat Reviewed-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 12a41b039167..6a712a8d59e9 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -2214,12 +2214,16 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector, if (dev_priv->assume_16bpp) assumed_bpp = 2; + max_width = min(max_width, dev_priv->texture_max_width); + max_height = min(max_height, dev_priv->texture_max_height); + + /* + * For STDU extra limit for a mode on SVGA_REG_SCREENTARGET_MAX_WIDTH/ + * HEIGHT registers. + */ if (dev_priv->active_display_unit == vmw_du_screen_target) { max_width = min(max_width, dev_priv->stdu_max_width); - max_width = min(max_width, dev_priv->texture_max_width); - max_height = min(max_height, dev_priv->stdu_max_height); - max_height = min(max_height, dev_priv->texture_max_height); } /* Add preferred mode */ From patchwork Thu Sep 13 11:58:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10599325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DD12921 for ; Thu, 13 Sep 2018 11:59:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CF4F2AA1C for ; Thu, 13 Sep 2018 11:59:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 011A92AA29; Thu, 13 Sep 2018 11:59:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 947722AA1C for ; Thu, 13 Sep 2018 11:59:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFA056E67A; Thu, 13 Sep 2018 11:59:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680069.outbound.protection.outlook.com [40.107.68.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54DDC6E67A for ; Thu, 13 Sep 2018 11:59:21 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.11; Thu, 13 Sep 2018 11:59:17 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com Subject: [PATCH -fixes 4/5] drm/vmwgfx: Don't impose STDU limits on framebuffer size Date: Thu, 13 Sep 2018 13:58:36 +0200 Message-Id: <20180913115837.7746-4-thellstrom@vmware.com> X-Mailer: git-send-email 2.19.0.rc1 In-Reply-To: <20180913115837.7746-1-thellstrom@vmware.com> References: <20180913115837.7746-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: PR0P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::15) To SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7196fed-92a0-49cb-4f13-08d61970559a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4589; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 3:tvQgzPw7g7nDTBgaeVj+GGkHiy5ST8rVrZu8v4i+azCrLn9dcpgt646ybCiFBPVw9qRrkmi4qEXThynyF/hNosqYeEL/dA66Ql4Fadx/CMpl+LaYHv46oWzsYBdqj2f+JtWNRW/BNfPZ16kXShjFJcFEnsXjMzXW44D4SQ1KBOjxscGnh9zNYV5pzLl7XmU2SQpYeIsyumqbEAqag2YhVCYLh+uBOsz9xisZDwiotEnSk6xYMuZoRsm/8d7NiJF5; 25:A1otdE1EIQf/0GVmFWtfMkAjrsv00Slbndu8lMVMVlvrDHKoomIHqbgnsOIemyX7kEewKENft6+TwhoRdY4P8D6xFJ7C3v5NtAXmkvPIEXfjOHZvJRqRTKerwzdemsja5VW0cSjQtefFaAS6aWveQzYr8+8qMPAgZ4bpm6zE7KqRGwLT1mS3u6343hyT6M0yekYGbkTQdZ3iGOF27et9ASb3LlY1GMaMCF15FzQAN+KP0YQaKdALUJUSpfoa110yPIuY2PUMtuSZe16K4rKuUS8BTnl1ZeOiy/cT++rpcMsyK7CSlrXaPdk9YBjzFQGHZ+wzmIqiDcnO8vOogP2fsw==; 31:R7w5aV5dyBJFVxZlf3pYmWoRxdtyTsOSeby/lr/uglW4zhnH3TEU0wNXvqO5ejdRk8pAfJ4+eFLro1FGO0+I50wSHhuUQSDMHkMR83en8j7KClaETjJPFCcSbWwnnv7G/41KHr+0MYk2Ue0DHxqyUjD0DchYbi5i6+1FSAj8E8qQ4JMdKzWGGL/d020M8ICn2/rEbSTGTmH4lnYWEu60ww8LpmTl+jImAfQt9PkShgc= X-MS-TrafficTypeDiagnostic: SN6PR05MB4589: X-LD-Processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr BCL: 0 X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:oM/XyziPV//c3c1YVdzKxwvIxvWeoisxAM+ao2C6is2UJ0mqFQsn1TKx6VRX9qZ8yBL+8PwTeBUKL2vvmE2F1FFSkPN4sTlpTWPWHu2yNGDHgMI0mIweVx8NtLP/NVIV4cVEHBDRT5aQAsgs4cKPyGgHAZN3z10hBw77+PGDTy69IrfGIvZ4/lJjI2Aotol8JoHM1uI+Bx2Ji8AyZqpXLIAA+I7VkGaqScRJv4OZtO8FtUzUFDJ3QiOeuPzgRwovG68NLGC9t5xKyZhb5rW/oRncy7/RRpkLPGkEPztDiGCQ5Bf8YnVi33QPgmieLO1E9jqCvMd0UdETdZSpDUSTyDOKM1eA9NgDlr3Cl0dWkB4U2vsXUH5fBSbszjZYI8PwYKQnO7fFRuEvK8GZOR8L7aG8qM4CCwOZtjYt9O7FSFfu2JZGwlcMIDG3fezD0I+qHnKw+1F1J5yOWcEKJCqMX6T6Fw97bFYoi/L9wET2BwLooz+qO0G7Rib8fLp0RY9OSXciVXQY7U4CZQUQVj5GRrRMqeOW0i08ONOYWYnOffVgVty6BDh1D6hdP/NXNUUQ6/zovUij52+Ci5G0oih9xjq9D4RlO8dOWW2wST0sTJc=; 4:hXs5gPHkUwlaThVEcj22AqIQNP+Qz/rXECDVYE02LRtacn4x2Ed2QDgeG6siMWqx8KEbnigU1M4ccEqMHDsDadrk6uUJhuumgyrYMwK/HZ+r5lI3EuUgi4NWmxUPlHJWZUpTq2j5U3oTKeVq7B7ctMLdhqF/TbguPSWcEj60UQgZaHaorum8oYQhQMEP8P7V9/J+lu+owZHLDbEqvBvqMexE4SwReYoC0OIGnfjB07/QdcxO5qsqmHfQQ4u8/UR82o10vV8dof1+OvtI62oYBYpmGIppyMzKTYQzMhUInA9lkHpGGlviMUe9oocIuAQO X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:SN6PR05MB4589; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4589; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(199004)(189003)(2906002)(6512007)(81156014)(5660300001)(386003)(106356001)(105586002)(6506007)(53936002)(2870700001)(26005)(6666003)(107886003)(6636002)(97736004)(36756003)(16526019)(51416003)(186003)(486006)(76176011)(11346002)(50466002)(81166006)(52116002)(956004)(8676002)(446003)(476003)(6486002)(48376002)(478600001)(316002)(2616005)(68736007)(66066001)(305945005)(4326008)(1076002)(50226002)(47776003)(8936002)(86362001)(6116002)(7736002)(54906003)(3846002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4589; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4589; 23:X/VWnSpO58sgAIVZ5Cf6fqwPtzOMkMhnksV/JlH34?= XTGnFpi7AS970d1RLnlHTPhtlaBc28IxE76kDBNpbKoVWrQHcq1vg/jPKwRvrWM3FgL5gQfL6hKxKDIMK8QFIC/0QH7f1YGywNTrYU8s5xu1L0+E+1w6Dfm6FLGKfOv+5pw/A7cwcFZFWbzmsjbf54NBHkHgWfdX/HshBC0Ev/7k0ANBxJ6IFj5nTABVYSMSJBLxgHSUga1MlD747n2mNjV/lH2wjbuxPrW6nDUoMqdfaGo8EH/6uQLjZr5llT7giNKH3tFEnhzd9d0z+WaPcqh6qyfqELOkMjZr9uZ4Gv69ACqL68jNiCO7DOmz3TnTq6V83uHxINwDT/KpJcr33o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iFJlSefFzQ448Jq/4 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:qTVpIssKIS0lwEl2KweUHQ/k7uSK/k9uE4D3dAkEE6UXDq9RCkNxT7xWj7JJYdpOYVZW4FVAMOw4UMJJTQLjsiwkgRz8WZOsS0xJ5/w68XaJ+ssSoILTHACP4xbv7zCYsksxGNPUsyTsFMM3+ZhMX8r1OwXMvjF9ftH6vDjZMmE= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 11:59:17.2154 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f7196fed-92a0-49cb-4f13-08d61970559a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4589 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pv-drivers@vmware.com, Thomas Hellstrom , Deepak Rawat Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Deepak Rawat If framebuffers are larger, we create bounce surfaces that are within STDU limits. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 25 ------------------------- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 24 ++++++++++++++---------- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c index 93f6b96ca7bb..f30e839f7bfd 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c @@ -1600,31 +1600,6 @@ int vmw_kms_stdu_init_display(struct vmw_private *dev_priv) dev_priv->active_display_unit = vmw_du_screen_target; - if (dev_priv->capabilities & SVGA_CAP_3D) { - /* - * For 3D VMs, display (scanout) buffer size is the smaller of - * max texture and max STDU - */ - uint32_t max_width, max_height; - - max_width = min(dev_priv->texture_max_width, - dev_priv->stdu_max_width); - max_height = min(dev_priv->texture_max_height, - dev_priv->stdu_max_height); - - dev->mode_config.max_width = max_width; - dev->mode_config.max_height = max_height; - } else { - /* - * Given various display aspect ratios, there's no way to - * estimate these using prim_bb_mem. So just set these to - * something arbitrarily large and we will reject any layout - * that doesn't fit prim_bb_mem later - */ - dev->mode_config.max_width = 8192; - dev->mode_config.max_height = 8192; - } - vmw_kms_create_implicit_placement_property(dev_priv, false); for (i = 0; i < VMWGFX_NUM_DISPLAY_UNITS; ++i) { diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c index e125233e074b..80a01cd4c051 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c @@ -1404,22 +1404,17 @@ int vmw_surface_gb_priv_define(struct drm_device *dev, *srf_out = NULL; if (for_scanout) { - uint32_t max_width, max_height; - if (!svga3dsurface_is_screen_target_format(format)) { DRM_ERROR("Invalid Screen Target surface format."); return -EINVAL; } - max_width = min(dev_priv->texture_max_width, - dev_priv->stdu_max_width); - max_height = min(dev_priv->texture_max_height, - dev_priv->stdu_max_height); - - if (size.width > max_width || size.height > max_height) { + if (size.width > dev_priv->texture_max_width || + size.height > dev_priv->texture_max_height) { DRM_ERROR("%ux%u\n, exceeds max surface size %ux%u", size.width, size.height, - max_width, max_height); + dev_priv->texture_max_width, + dev_priv->texture_max_height); return -EINVAL; } } else { @@ -1495,8 +1490,17 @@ int vmw_surface_gb_priv_define(struct drm_device *dev, if (srf->flags & SVGA3D_SURFACE_BIND_STREAM_OUTPUT) srf->res.backup_size += sizeof(SVGA3dDXSOState); + /* + * Don't set SVGA3D_SURFACE_SCREENTARGET flag for a scanout surface with + * size greater than STDU max width/height. This is really a workaround + * to support creation of big framebuffer requested by some user-space + * for whole topology. That big framebuffer won't really be used for + * binding with screen target as during prepare_fb a separate surface is + * created so it's safe to ignore SVGA3D_SURFACE_SCREENTARGET flag. + */ if (dev_priv->active_display_unit == vmw_du_screen_target && - for_scanout) + for_scanout && size.width <= dev_priv->stdu_max_width && + size.height <= dev_priv->stdu_max_height) srf->flags |= SVGA3D_SURFACE_SCREENTARGET; /* From patchwork Thu Sep 13 11:58:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10599327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16510921 for ; Thu, 13 Sep 2018 11:59:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 056242AA29 for ; Thu, 13 Sep 2018 11:59:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDA2E2AA39; Thu, 13 Sep 2018 11:59:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9CBB12AA29 for ; Thu, 13 Sep 2018 11:59:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 87EC36E680; Thu, 13 Sep 2018 11:59:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680083.outbound.protection.outlook.com [40.107.68.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id 593516E673 for ; Thu, 13 Sep 2018 11:59:23 +0000 (UTC) Received: from fedoratest.localdomain (155.4.205.56) by SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.11; Thu, 13 Sep 2018 11:59:18 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org, linux-graphics-maintainer@vmware.com Subject: [PATCH -fixes 5/5] drm/vmwgfx: Fix a buffer object eviction regression Date: Thu, 13 Sep 2018 13:58:37 +0200 Message-Id: <20180913115837.7746-5-thellstrom@vmware.com> X-Mailer: git-send-email 2.19.0.rc1 In-Reply-To: <20180913115837.7746-1-thellstrom@vmware.com> References: <20180913115837.7746-1-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: PR0P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::15) To SN6PR05MB4589.namprd05.prod.outlook.com (2603:10b6:805:38::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 013fc485-351e-4233-df10-08d619705677 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4589; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05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yzP3ZPupCiBUNm90a4Npm5FT3+lJ5xwBqSPLupC3VdpCU3UaB56EMoWBamhn0MrnHGV6q0Zg+l66Xvwd6pQM2wCiek13dsj8XtJA4dcEfV+cirzhavxX+spcKurqUfm+f1SF4pxu6U9+KLapipvuw26L3et+TNzNOKDvVX+ZmUDlyZmcLZ9UGNvpTCPQCpt+Xe6ek6j++3H2D7mkOrWKLn8coMpEGVpNRS0jy64Szb61atsU6yiLJTIleItoPqFzv4w1CNvHHMFNv23/NGJxlyW3H8B1RoTHgGs+CtZtqZxgIJEFYO/Jz73bCOIFXavizM3f8e25m+dss3PW/9Lbu3y5Rc4XTAHwI3cMIMuC8FtYocCDAyUz9Hi0/eetRTtBkXoH2p4FnR75ZRVVRym5ah2HbFiD3U7qzYKC+bzI3z0YnQb4ecQEFZpb2QA5EBiVLZRTXBjxfBZKzdHANnE7SqU/xyzUQu+EbG7WQC9QkBtvqDEA3J4fyyEZw+efPKvUOqXjBvuq/LKKw0=; 4:gzv2gfwh1YC4cn8u0f8OK9S3OJR1PNEU3f7X57mntSKyWBOAh9EfC2WvV3gU7y2pFfhQCEwCWuqJ0zlY57QIp1FXB1gpMe05Xw6l4Nn/h1tWzZhZlTswN4j30umSrdvQdH1B4/ncT11CRtC05DNZpRwQS0zeNKIFKhGn4JcN0Vsm5WvpJsjna9OPiTgZhmavjWWQ+PNaR1U2ynbTuocXPamIDbUUJ2ScAcL3WKVakTGcaZmW0NPqDmaBhNJ3vc9sfZZSCHMHPfe+UKz09xD457P6KeoT8r+ol0/7JLkDB5zWyATd0br4EBIX9tt/j8+Q X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:SN6PR05MB4589; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4589; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(136003)(366004)(346002)(199004)(189003)(2906002)(6512007)(81156014)(5660300001)(386003)(106356001)(105586002)(6506007)(53936002)(2870700001)(26005)(6666003)(6636002)(97736004)(36756003)(16526019)(51416003)(186003)(486006)(76176011)(11346002)(50466002)(81166006)(52116002)(956004)(8676002)(446003)(476003)(6486002)(48376002)(478600001)(316002)(2616005)(68736007)(66066001)(305945005)(4326008)(14444005)(1076002)(575784001)(50226002)(47776003)(8936002)(86362001)(6116002)(7736002)(54906003)(3846002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4589; H:fedoratest.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4589; 23:V2KyWZFDYd0EfI67XUrz/ut9yRPi/sRw4uax8E4nL?= 8RsL/BT+SKyT3X6lpoM1n/TlAF+Yc9fK83lk4wDZwmHX7MojwrmlVR8N3e9Inqks3At/eMyqBjkCWaFxhc5qo7nictOX/f2L4xBL7uglG8D02UhZEpt1Uwn0ASgWRTX6Uc6IuAVzx+JY4bFcqjhFkM3g28SzIk1kSqFypNY4Af9c0u5QCE/hi6NXxvED7UkTnLAsdRDH+w+Xx+UQ0MHbkIkiKmmplp0gRsEeHPRpB+zC0avg6Cjsyj4S57qfgk18dc5QKgCNmcLEYtF4bYY7yjCtVnfL4Jl//y86O56YB4F35EzsPDFFT4WS2WUBJR47yzcCkig4manreVBZrx1x3yhA+wLCKO71IEIaJ4rjT5TYSy+i2Nk9zb1Kh5G5Cm4zv9xKOTTs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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4589; 20:/aMDE1/csqppEGCLjlmpDTJQmxCTx+zrBKmKUAdWQxKhtpa4d+HRb3L1UEOUw17v1ljHEDz6bw6l0fj8XheD6tiHdvba2b2oPnRB+kDy22+iEMgvhtMmjLF5CIk0lpoOmU77DsEAE2i7qtCeC/rOpRiQPmWB7geWOYL4s2/uG2Q= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 11:59:18.6844 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 013fc485-351e-4233-df10-08d619705677 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4589 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pv-drivers@vmware.com, Thomas Hellstrom , Matthew Wilcox Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit 4eb085e42fde ("drm/vmwgfx: Convert to new IDA API") indroduced an incorrect return value from the function vmw_gmrid_man_get_node(), when we run out if integer ids. Instead of returning 0 (meaning non-fatal error) we forward the ida_simple_get error code -ENOSPC. This causes TTM not to retry allocation after buffer eviction and instead return -ENOSPC to user-space. Fix this by returning 0 when ida_simple_get() returns -ENOSPC. Tested using glretrace. Cc: Matthew Wilcox Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Deepak Rawat --- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c index b93c558dd86e..a38a0c3777f7 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c @@ -57,7 +57,7 @@ static int vmw_gmrid_man_get_node(struct ttm_mem_type_manager *man, id = ida_alloc_max(&gman->gmr_ida, gman->max_gmr_ids - 1, GFP_KERNEL); if (id < 0) - return id; + return (id == -ENOSPC ? 0 : id); spin_lock(&gman->lock);