From patchwork Wed Oct 2 12:01:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174973 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp660722ill; Wed, 2 Oct 2019 05:02:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpaWAIxvgPJz5Hd+Ooll684DV/eBdu+dfRhuAeb9ghd144uZ6rVXSYXlUhJshsyBEVop2B X-Received: by 2002:a63:6c89:: with SMTP id h131mr3474807pgc.322.1570017744374; Wed, 02 Oct 2019 05:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017744; cv=none; d=google.com; s=arc-20160816; b=rQdNj/Hz22LXq3xKIA5IMzRo2HXSby/R7g9Qxya/CKUwK4uc5tNnMSELmQoQffZdRV mKgU2/a0YWDM7+YaDwgHNW/7bfhAtP3kxgY0J1lvpAUmkNOf320MklsXCgeQzYpPgVsU iJJtrw11WPEq3pSPoEolgx9i4KZIbLGsDJjz/90ben5JkTGLTuEjiyyW0V/dPNxxjkhX K9uVSlCNyO6AiEQxE4NaepkbHzHcVzOXTQHwffBomMQ6YNtIlaGtj/A6E+3osewturwO c0+/KBaILmKQ16xMkngeOmDRinJka8u95oSkjfAiMeMJbOLrPvAQy8vl+ou+3ez9VAhR Iaaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=8BsvDtovO6uyLPtR66jBUCAFPZZC3fPXAzACZMD9Xhk=; b=EvlwC5QO/xmBJ5jivdZxIZcGxN7S6glIdb9uuWlHZxCE/dH7bi5Suka+ygy9xy0MLe v+lPKgGxd5ooXufg5fwjb7HOKrh3aKo5Hz+MTDTAI151iPlI/f5pdzvBpFK6ntL1THiJ 8W/6pM1t6Ih7uIP8pdEskMSPiqsbtMzqB9hSu6q4IUKJEsZrAbrej47g+fZvNXPFBTRE VaEnMu0ApOHgrrDdwknFkvlbGq2ore7W5qzZm6W6ARRfs3cJqf81hyGlKIWkUSFEHStK BsawdwcNLZJFZrfVPpxbLl8OT0bJrTXwtyKcXd+UoIBia/s6pBzP2ItojoDJDfqLHKjz TgTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id y15si18712891pfe.274.2019.10.02.05.02.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 05:02:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 694E8897CD; Wed, 2 Oct 2019 12:02:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8AE3897CD; Wed, 2 Oct 2019 12:02:21 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1M26iv-1iI7En17CD-002Te9; Wed, 02 Oct 2019 14:02:16 +0200 From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 1/6] drm/amdgpu: make pmu support optional, again Date: Wed, 2 Oct 2019 14:01:22 +0200 Message-Id: <20191002120136.1777161-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191002120136.1777161-1-arnd@arndb.de> References: <20191002120136.1777161-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:a5b90JQEWWEeBtwVRSZFjdGm9b3I8/kdLc+6ckDpRAohLoCOLNA Zt4AJ464Pz/isbP+TP5Kwc89OJD3wbonPMlq/qENKAvYZB1vR8s2mS577y7JdJA+FtGwNAm wv5IefPzHdJPWeBjXQg9O5pmwYi/FuswYNw0pL0xXRdmWyFBmcYgbalu8WPFx9G3U3VFOwc JV8P3sVH+zYNVEG8X0rNA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:gCX3Pclsid0=:2lnBRc1wB+VF4RSpdJj4pZ fUwT10GYvO0RsxFhbCUbiaYIcMydMqqMM56ICOu4Ar1iEzLA4bLtuE2kjxLk3E61oljDTaPkf wXWUN+FYoFQZQWg014b8ji+w/TzQmvBIydjneTRzjw9psnZOH3q5kd80JSSlTOnA5Jt67faFG SYCwOoaeaeEtyr/LzIBPSSiHFfWrZbolvAJf+P+OHRNrDttMBmClrSGBtWEHMIDhcCTWZCmH+ KUwJthhWAqgwIsI8zMc3w6APokxYyO2Kk6mtyu6dbUxL+aI5wbfuFvVdargQIKy18Xl8AXRJQ Ar5fBn73URH/PbHM3bXFfH5owy4aqZQH1Wlmo2KX+5RuhkTt39ba/QWvPM/XvPqs2DrU1baxQ nb2CwF7ucyLT0T5sXzHUyHVxRXX6BEolSLzfLJVqgvIJJ2oL4l09qlg5XssKdoTaQ1vRXznKo F4yZjZir9RbLuE9lmQY0Vtq8aK0/4cjErS/JUIjIkIrKWtXg/TrklmkwdSW6uhZht8QP79+rR YiTKNAZNKZgZm67NQjHOA7Q0e11HtM8B/ofPgXvvw7jQ+x/zfD9oZHQ7vqOttg1o+lGBRbzck 5zjXRHACBqPhJHjHWh5Vt3nfHftZs5meLjT4MX3KhCD0cl0b+/DYY38aaNnE/h9wkkK7tIm2N RFcnie4SKAfRNC+zeaTqhxo8Ev5EiDVg5ux1iynqkEof4uorAWjyW4tptFFCCdtP61kGptB8U uNvPiWYiK8Aimjr+Yvc8D8lnxzzHqeDhSu5CjfukuG/ZSylarKgsyDwQthMBs/jFRpZLNFlt5 WJyAJYvPyrCxWFwePNBukYvFe8lg9gXEZagcgcVxUYOK2kUvaVa7GMOKNylTYpmjw6txrjPoa BhFwQrKLI3BWRiiXf1UQ== 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: Arnd Bergmann , Huang Rui , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, Luben Tuikov , amd-gfx@lists.freedesktop.org, Hawking Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When CONFIG_PERF_EVENTS is disabled, we cannot compile the pmu portion of the amdgpu driver: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:48:38: error: no member named 'hw' in 'struct perf_event' struct hw_perf_event *hwc = &event->hw; ~~~~~ ^ drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event' if (event->attr.type != event->pmu->type) ~~~~~ ^ ... The same bug was already fixed by commit d155bef0636e ("amdgpu: make pmu support optional") but broken again by what looks like an incorrectly rebased patch. Fixes: 64f55e629237 ("drm/amdgpu: Add RAS EEPROM table.") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 42e2c1f57152..00962a659009 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -54,7 +54,7 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \ amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \ amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \ amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \ - amdgpu_vm_sdma.o amdgpu_pmu.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o + amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o From patchwork Wed Oct 2 12:01:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174975 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp661553ill; Wed, 2 Oct 2019 05:02:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqww1XrcSiKw61DCH8+23Kwrb0oWtnZWDci+cd84E9JspJJlXRV3riaLxztAPYJyDw24JmBf X-Received: by 2002:a17:902:b684:: with SMTP id c4mr3377750pls.102.1570017779461; Wed, 02 Oct 2019 05:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017779; cv=none; d=google.com; s=arc-20160816; b=VhiMq83DQjcW2HarvPSdLn822F8GopobSpEenl1clgrpSACyzVaXgRuqBgOEkHwHUC E+PDco7txW4J0Uf2Xou9j8hdkI4KInMuPvEe8HXNsQdi5dGW8A/i1sEcr7BimDmP4yHz Pw2+t8MW4fgOWQ8uq7+26f7ZNoUUBihLWaJZIaVuiwHM++/bWV7m0z2XjceQBOuKoE50 C0jdx8kgvYvbH4ah/a530AdokltMn/ov5c+jS5JjGnPJtnalzcpWyfdsBiI86x9nLX/v bO9EU+94eU2aolrlygbeLXAecoeCr48lCfZIyqBr8PrgUH/nIAhxFjzhk2+sy6bKi+46 HPGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=tRgv02w1RTJ80RHp283Kj9UQP969J33pEyGz3C5frTs=; b=fZQUWzThr5IaOXYWLgEozVVABdMSsVsde3RPAcdGKJpeguZGH87/jK/J4M5EZcyvI9 w+2J5LuYsc73JlgigBuBgb3laXAwiuNQp+ZAbNh+Vmli0JzI1D/q4MDMwfwc9caTNgeN gKecFdqzIVuZv7O3Hx8X4fIJeeLj0zNcVgZC4aBfMDsOIQXGmNP0WEqtGf/03ZsrQKcu +lCtcYsoRl5aPDuafB6n1CCHspyZkYxU9sEfb7A7wasLOETfj/BPkeQuyMfu2GHuUWeu LwYhcVxnDap+ZoJ4jlgZzXZAnHRs3pBMwm37LxYgHe2w6mcGTxrFtu1EJEZpMRCCwsVq n4cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id 63si18293955ple.332.2019.10.02.05.02.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 05:02:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36E9489A44; Wed, 2 Oct 2019 12:02:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9938489A44; Wed, 2 Oct 2019 12:02:56 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1N6srH-1i4Jx02kQB-018Nqd; Wed, 02 Oct 2019 14:02:49 +0200 From: Arnd Bergmann To: Alex Deucher , Harry Wentland , Leo Li , =?utf-8?q?Chri?= =?utf-8?q?stian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 3/6] drm/amdgpu: display_mode_vba_21: remove uint typedef Date: Wed, 2 Oct 2019 14:01:24 +0200 Message-Id: <20191002120136.1777161-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191002120136.1777161-1-arnd@arndb.de> References: <20191002120136.1777161-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:oBjKGQ3jYf0A2J2ocemwNHrJLF3mvVMEn6zOLTNAGubueuLRYyk BpOHFj8UwLoAn+bAxDpM0Us8z6MwyTwhFaeTAJtXgpd1gN2qJVEkpNfIB76daOLbh6I9g1g ahi1mLhjBji4qSGK5wctAS/ZXegSzGKfel5KNAxFR+4Ew0SuQO7JYnxKngDUC1t/3w0hgkw 0QdnYpJY4kkYs3R/f4iCg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:eSQ5Yr5a9oE=:9FRtoMlN7bwSrOG9f5YY1I bpZ3Qlyhsku0LcpbDJu5j1GigQk6vUWd/VoWhAWdlLLxtXK+BCdOiQtpfBiQFZdP8FLJ26cuR kV5qGa3w8U+kaC94DSFBi0lHTB2sNsHBjsd2p8WvqTLIZwirBsTcidrQkvC2sa1DPz0RHHLd8 U9Vnvws8HuDgF+P7zwa3qcikMwSX3nStW4yO3wtkWdKwr6Uglr1x0i8/QF3LCtLtK4FEzrZVg bM4cQCIHQZpPin18GxcI5pwvpk2Qgoml/0vjZaUvLxFLn2V4iCWTtG43DqQmNKwH+Uu5EPbFE XKXWZUhX8b8lTqAqeEI30b2ahQc932Gp2k9HLD4BRhgWp8Ig9EQRTUgQKWSsTHSTnQtU1cNv+ 4wMcWJOh0Doxtl6hUiJzmGCWOFc2YYIcQ9ELhsb9uoUBPdrVP4Cjrk1ffgCIZs6HhA7bvk7NE EZVguXf2MjBwrvsRdR3dXp5q2dELksAz89Tywytd8DQjNspuSufMllFGCsbJxVOgVSEnevN5g fKYidaTAnk8c1QQo9w9YM1DRwbCfHfDbJUTn+5ROSNw8cDuvGt7AjNVZUyBKhRUS3S6hrk7I5 34ybrIVzQiMV1ahqKIPXzQ0zPNdkHLSJNEc5Zt0ixZByldmxHwcytbpqPiVd3k++zjnk1lmAh Cmv0SEdjvSfss1GwwRbvWZi8aTQH32JG2l9zkRPg7Dnv9F3dDWn4s9meRO7HnvAqZHffcxad3 vMQ1fsnJ20Ma1FOm07EGM6aLkWoypGrNlbx+lKhhjGOg0kBUxqdy1pVidgfcwS403HhTEwiuL BlKxnY8Yx/kkAUL/1tXVJvhmg2XNXfg78iWD6M/9MmC8aZWKvP915zIr6FNADpRBtcjNi4JOp 8nnSZfI7XGVLOMcy5tjQ== 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: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, amd-gfx@lists.freedesktop.org, Bhawanpreet Lakha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The type definition for 'uint' clashes with the generic kernel headers: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn21/display_mode_vba_21.c:43:22: error: redefinition of typedef 'uint' is a C11 feature [-Werror,-Wtypedef-redefinition] include/linux/types.h:92:23: note: previous definition is here Just remove this type and use plain 'unsigned int' consistently, as it is already use almost everywhere in this file. Fixes: b04641a3f4c5 ("drm/amd/display: Add Renoir DML") Signed-off-by: Arnd Bergmann --- .../amd/display/dc/dml/dcn21/display_mode_vba_21.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c index 46cda85d3d63..998970e2f84c 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c @@ -39,9 +39,6 @@ * ways. Unless there is something clearly wrong with it the code should * remain as-is as it provides us with a guarantee from HW that it is correct. */ - -typedef unsigned int uint; - typedef struct { amdgpu_dc_double DPPCLK; amdgpu_dc_double DISPCLK; @@ -4774,7 +4771,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l mode_lib->vba.MaximumReadBandwidthWithoutPrefetch = 0.0; mode_lib->vba.MaximumReadBandwidthWithPrefetch = 0.0; for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) { - uint m; + unsigned int m; locals->cursor_bw[k] = 0; locals->cursor_bw_pre[k] = 0; @@ -5285,7 +5282,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport( amdgpu_dc_double SecondMinActiveDRAMClockChangeMarginOneDisplayInVBLank; amdgpu_dc_double FullDETBufferingTimeYStutterCriticalPlane = 0; amdgpu_dc_double TimeToFinishSwathTransferStutterCriticalPlane = 0; - uint k, j; + unsigned int k, j; mode_lib->vba.TotalActiveDPP = 0; mode_lib->vba.TotalDCCActiveDPP = 0; @@ -5507,7 +5504,7 @@ static void CalculateDCFCLKDeepSleep( amdgpu_dc_double DPPCLK[], amdgpu_dc_double *DCFCLKDeepSleep) { - uint k; + unsigned int k; amdgpu_dc_double DisplayPipeLineDeliveryTimeLuma; amdgpu_dc_double DisplayPipeLineDeliveryTimeChroma; //amdgpu_dc_double DCFCLKDeepSleepPerPlane[DC__NUM_DPP__MAX]; @@ -5727,7 +5724,7 @@ static void CalculatePixelDeliveryTimes( amdgpu_dc_double DisplayPipeRequestDeliveryTimeChromaPrefetch[]) { amdgpu_dc_double req_per_swath_ub; - uint k; + unsigned int k; for (k = 0; k < NumberOfActivePlanes; ++k) { if (VRatio[k] <= 1) { @@ -5869,7 +5866,7 @@ static void CalculateMetaAndPTETimes( unsigned int dpte_groups_per_row_chroma_ub; unsigned int num_group_per_lower_vm_stage; unsigned int num_req_per_lower_vm_stage; - uint k; + unsigned int k; for (k = 0; k < NumberOfActivePlanes; ++k) { if (GPUVMEnable == true) { From patchwork Wed Oct 2 12:01:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174976 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp661790ill; Wed, 2 Oct 2019 05:03:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFw4wfwN3rTBBG4xKzgJ4/EaA6d8zBK+E1CuWTNifaWBn/t5SXqxvmj8vr34jtSXC1U3Do X-Received: by 2002:a65:5883:: with SMTP id d3mr3455077pgu.332.1570017790075; Wed, 02 Oct 2019 05:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017790; cv=none; d=google.com; s=arc-20160816; b=H+LhUjiO2G4mAENUY0kCeHIqdpvJoXEFHOTsyVpRR6DdxIXaZmJz85xZ5y31gkFU/e 8Uz/LHrHKI1n+smalBKvw/kE5wWOA6TlE6ri2UbBCVkThdX3ew3Wsf7ZVPOPUqMW+vYS AwaQoZwJxK8chZbtMhZq6cNjNs4qR1q6pBonuO4IKq3Jv4aak4nM6qMEEeVxDq2d4Kp9 Cn2++bgwdDtpCm2jqop4wNR1ZyuH3x9RqAALcpztBN+dIbMJ+laQAgSgTZf0ztItOapX K85usTidXcgbYaUqSj0xkhzDKMa4axqdPqDZ8Txai+wLRaPbxaDxThKU9d6r9FwuoqLk 0zXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=9sESzlCwK9OOT6EhPXtS1oI77ShKAWSi4ybUB9tpOwQ=; b=d0wtH0UcZiJb1HIpDrdPWLaBdt9PqvAGzVezIP69Uel2KHpebQhJ1eRJK4jbs16OOu 5/pqjJlfM0smhSELp1dGFmBu6oZo8WtW4rTgrmLuk+N49gI8nOGbJsddkc+IwexUuQqr yP8OcgCrJ1i99FIhz9YBC+LQ5amgdJKdJ0Oz+Ji/8XhnzYADOJf2Bp+eNREU9nST2eip tJtLJA48B8x8qStWv6nZ3JvH3wI/NRO9NvElC5/kFL13k0pQHVdnzWBsHTegvsMnQzwg Xi57q3HfJbH6UeYtdY7+cwsEeQuw5GXVwpIgFm0sc0qKy9V6RHqKz8TpP+6FIqEM4LoF hA9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 127si21590491pge.403.2019.10.02.05.03.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 05:03:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D46218981D; Wed, 2 Oct 2019 12:03:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 559A28981D; Wed, 2 Oct 2019 12:03:07 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1N17gw-1i9YkR0zSk-012aQY; Wed, 02 Oct 2019 14:03:01 +0200 From: Arnd Bergmann To: Alex Deucher , Harry Wentland , Leo Li , =?utf-8?q?Chri?= =?utf-8?q?stian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 4/6] drm/amd/display: fix dcn21 Makefile for clang Date: Wed, 2 Oct 2019 14:01:25 +0200 Message-Id: <20191002120136.1777161-5-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191002120136.1777161-1-arnd@arndb.de> References: <20191002120136.1777161-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:iyh+vgBexJi73bPkiI60pHY80NTDCFDTYEIUMn80jY7xmFLFyN1 lOYL3f+3oMpNTxy5GNVwJ3KsEs68xZViW7fENNgg3Jn5U+V1egRUjVEO1ktCKff0Pvq9jvM 4GUnHYGOIUtOw3K3Thgb50nUN7iI5JiiL8myJPlaQsN9Bhcd/4wqCRRjdXAaL1TbjWAsBvu 6OdkBy9ayup/rm6WjvHtA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:osAlctbyQR8=:PMoF551m2feK1yVfj5p1si 0NsF0Vw7jCbM3UjyL2s9+FckHGlfjS2CR5RQ8ZjWJhwRIW19TTs3Fw3o/8QRBcxnadhwrtTJs u/bBXHhGLUf9GfY2GQ5YbtfE6Y7lDCTClYdkNAJ8Om7NUJ15ngHT+BeANDCC82sO5P1P7Kqrh 7Apo4JVc9XpchQly/4+AJ0Aoslcr3xTdDH5crjBlFoaDwiir6YfXa8q/A2NB+y9jW5M7x50XF srjEuZqSdlsFcY53m4r47Ckm04Oc6X6P0hzM6HlKXipty1ePvojObDCjOD4A6rOwtGpDymgeZ pBJZtnC0J9T4DuvTuqqKWrZu3V2YoQQAnt7Wau0Ilkrn1k599PEbivZl3lDzXMh3rvlY96RiC AOKVbfVyiCZp7JCioSHddRzgaQEB9GB7kbhKpSoJm7aHxNQtm3IYJ0uZQney+UIZaeQF2euu9 YXFAjzM4HyyOrmVMv1aD981VTUfnCH7kdTE68ncoLBAb0fhu3TQrBSZZEuDifhvCNwA1J0twW 2P/Qby4iOItQ+N35i0xNBN0GglcxPdx7QfPYUbI2ihJK7uCKf3vhi2svF336F5xsnoQF6B2zL 1g43JHYgF2hPy4ufjpnwOIW1vm7jMUnQnwY6RuCw/yEPlIqH+quLN6685+4nZoZIEOgk7Jc65 UxSLEC7Z69DRdRNoyAErimL5mBLoTsyLuSIbdAMu9Aigcmnu8+xozb1hJsZWGs+rsqXPILL7e w3wNvnPx6deHku0JWxLzCTmFfzWVVjPFMoSWC+xdE1vSuqn0s5+nbd6GGDRxaVRT7IBOycOCh BYn334EnghabAFgHkq9Hz/KzKXLfVdhlTgwqF36uo2mh1mUfOsaoYot2aaMLxAFooFvsTN5TR ov53b8Y7fCwiurBPSYww== 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: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, amd-gfx@lists.freedesktop.org, Bhawanpreet Lakha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Just like all the other variants, this one passes invalid compile-time options with clang after the new code got merged: clang: error: unknown argument: '-mpreferred-stack-boundary=4' scripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.o' failed Use the same variant that we have for dcn20 to fix compilation. Fixes: eced51f9babb ("drm/amd/display: Add hubp block for Renoir (v2)") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile index 8cd9de8b1a7a..ef673bffc241 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn21/Makefile @@ -3,7 +3,17 @@ DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o -CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4 +ifneq ($(call cc-option, -mpreferred-stack-boundary=4),) + cc_stack_align := -mpreferred-stack-boundary=4 +else ifneq ($(call cc-option, -mstack-alignment=16),) + cc_stack_align := -mstack-alignment=16 +endif + +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse $(cc_stack_align) + +ifdef CONFIG_CC_IS_CLANG +CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o += -msse2 +endif AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21)) From patchwork Wed Oct 2 12:01:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174977 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp662087ill; Wed, 2 Oct 2019 05:03:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwp5tKGRoXizkBDMTBZULob84GGHNMjPHTCJaBD+5i+TCe+elx5zlPMPBQpK6XBslutdO+ X-Received: by 2002:a17:902:a717:: with SMTP id w23mr3299094plq.17.1570017802655; Wed, 02 Oct 2019 05:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017802; cv=none; d=google.com; s=arc-20160816; b=D5fnj2YAUmvE6yUzhXbEeSI61r/qbsf9OHT5RsJYaNOsfYU7tkJHwT06eI+H4KGuzQ W3eBtElg4UpaYCEYH7ykFzrYbvxkkcLsinl3cglRrzQ5hiJBOVoCvZw6JizUWm70sOf1 z08in3n3rDd+GzNAMBC7SLbtjKPZpVdfk+5lRNDbWSQfTByu99VOtet6iI0fMfdj8Hcn Hmy/q8gZ4XRPKE2IdWQR+PDiYQEYFaWC2mqyWGmCh3OQHaLrArb6BAM6/u6tZ2rXXf6G 16jcYdso3tPxf/tGri55lXyy/9pyvog5H8MLO9cTtXGpAuoCnU05i4EuB863LSSUWsHI Crew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=qy8cEoDQ0oHuH35v3AypRZizloLDgCYfau45eDXGkro=; b=bDUxDpiLOovqzoZAr4BRjwvRGovK7Fgn/BPrTJjQ/TxZNog8+jJ9rIrPUa3r9IGBlp zysYGYWIWbwQWq8j5+webGr98z8ifAKjwNJxVCe0FeheY0Ppl3MrviWsM/KksYBV/ObO G2am7Lok+to06Stxb+yhLf7iECQNqePTtphRObSoUysWzvlbosmkbRecwTX0daUwz8Cl auLENnt+OZ9rBvuIhq7PKEwYTgKTDfCEDrJKRpKL0epHtOeayE7mVT1Islb1+IAd5MM1 hGKDXSwQhJDzpQpQ1wDwEMie33SfRUZhPg39Pmw59xI1XR5cq5Ei07UhsnyFtEIpK7ac ouHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c4si19328448pfb.218.2019.10.02.05.03.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 05:03:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 85BB589B7B; Wed, 2 Oct 2019 12:03:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F0B289B7B; Wed, 2 Oct 2019 12:03:20 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1Ofr-1i9piT0TlL-012rXj; Wed, 02 Oct 2019 14:03:14 +0200 From: Arnd Bergmann To: Alex Deucher , Harry Wentland , Leo Li , =?utf-8?q?Chri?= =?utf-8?q?stian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 5/6] [RESEND] drm/amd/display: hide an unused variable Date: Wed, 2 Oct 2019 14:01:26 +0200 Message-Id: <20191002120136.1777161-6-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191002120136.1777161-1-arnd@arndb.de> References: <20191002120136.1777161-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:1n5M6zZR4G8yBL9D3/PPSqfSjJLO9/wJ7CFXKkY1GhO9dfbJMYH BiSgOyk4TECZnA3BSyAneDEqnYgbFD97WeiIo4lGIG8gXruAgbG+OFz8JrMXpu4H9o9caks Np/4Fh8LpTmpmV6Xp3jiphnuOB/fVWxp/AAMAajPUx40WWakIcnYsfRjRKmzW5r6zab6tVy JE6I3T9syZxzU4/jUrblQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:naTv7zcdLbg=:K0DiYgcUAFUIvZNSJLnPhF TR8ONd0H5vlFNo9s+S173Y0i1yWRmEuEcfuiUtbDNfeQhxSN4qbsGQHKYowzOslPG4Xwm7iHh gLASVPq3d4YTmFVY590C6iuhoOJzAB5eYIIgr05Gqlx7CR668I669LA90dj/iyUKfUnzDrJar LZnab4p+nt4C4PfV897q0HFaPFLgvb4CmfyFymF3TvMXJiRpUBZ/RyI74KSi8LbvKSGujvfCO 1XxJ7oH1mtw+Uf/jeyTxbL3aLzXfCQ+Q+eywDgTgJeZe3/r0Lz/5jR1N81AhAsov/jhUCgVo6 G0CACRv6k5HfVXr+LnzU0RVPue/t4oSmm85X4QRjO0ycxRun1YW6GPKbjEwl6yUGrTUgmes5M CgZ0b57xUI4cr2Wlaqz5XI8wYnCPRsRr0gepZx+7vQWrBsqUQTgE5ON7U//qfRVQq1V1NIXk7 WjCYrftUGzz3p28lAANIFZ4BngPJZ4u+GXqo4gKtFnoZvSgr21XuTwMH/A485jWmMFBJ4DaRh ukxFYBiYyuPHV2Tl6J1cZGw5HUNurtA9UsNc8Q74rboxhdw2enud8CsC9XRY7kGZA2msxsqPv H0gce7q61WH6+lviiLyAo1pFAzVRqZtO6m/awVb2gVLoqKkPV+MmqwTdK9A9eDVNGRzbb7/MH lK67JYsSZffsn0qHPiBDie2qQ8aZn+wGUas5aQQTxxx2XT67KtbTtz63FbJ13tyJMgyRViIR8 YwFfXd6rCOs4ZuKJxz0nSW1QHEgR65YGVuNpb2rKl85o8Drf2xLESyWNx0lD6BXPq3KRSGCgQ O9STRSdwbZkJFO0E3wLP734Wopq5REw03eGLVciu1Uh0Xt3UtA0Fx7J17HWcsDzq/AWzmSv7N fu42zs35kwyPfqf/bz9A== 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: Dingchen Zhang , Arnd Bergmann , David Francis , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, amd-gfx@lists.freedesktop.org, Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Without CONFIG_DEBUG_FS, we get a warning for an unused variable: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6020:33: error: unused variable 'source' [-Werror,-Wunused-variable] Hide the variable in an #ifdef like its only users. Fixes: 14b2584636c6 ("drm/amd/display: add functionality to grab DPRX CRC entries.") Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann --- This was a bugfix for a commit that landed in v5.4-rc1. The fix was applied by Alex Deucher on Sep 19, but is still not seen in linux-next. Resending to make sure this makes it into v5.4-final, but please ignore if this is already coming. --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 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 8cab6da512a0..7516a6436822 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6019,7 +6019,9 @@ static void amdgpu_dm_enable_crtc_interrupts(struct drm_device *dev, struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state, *new_crtc_state; int i; +#ifdef CONFIG_DEBUG_FS enum amdgpu_dm_pipe_crc_source source; +#endif for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { From patchwork Wed Oct 2 12:01:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 174978 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp662391ill; Wed, 2 Oct 2019 05:03:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0QJK/9WVM9ch8Wdq5OaA7c+nfp60ZCgXNZ3jnbf30RV5rJ+8slCx0ZsfwhHTeROLlbbkB X-Received: by 2002:a17:902:56e:: with SMTP id 101mr3309898plf.90.1570017815263; Wed, 02 Oct 2019 05:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017815; cv=none; d=google.com; s=arc-20160816; b=VT4Hs9jsrd9w9vIHvAq7FAqHg2gdcBMYeXGlKDmUVhh+VlxBustcfFwU3E0e9Xfy9J ynJl1QFnM8zzlitDusjAz0KwpcnJ2yq/ejPN8Of2glxSI+LTKkwyWQJ9QA2dnEEUjw1s AYyD8jxu6dJDoqsiVMNZvFSoFRrzTvvCLQGivJK/s2vUwkwCidXo+8va5dx/yuz9UalM DXhVk74uxz1taw4IXiXGMSIPQGm2VWlcSfuTBD8nQ+yB/My4eV7Txz8C+kQi6uwqmkvk SDqGFeHd/mHH26x7iUiB43bGXpzHRAsXjJXYrNduxeFF9psmsPB2E2T3V4GXA7XY0ziH nl6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=7kbMcAuh5K/l2/6YsFX2B8hqFXeHAUBURFVcWSkyC+I=; b=Z/I/ik56PPw1IE/UUrp2d3OyYT7hgrM5fMoIcjyvUKGcLFolo7LfydiCrttCXs8yjs 4sDb0odA54vrBU3v013r9RFeVj1AnV1Peai+VUT4e0fbC2L4SFA9G5CSkRhtDpBDE3zD y1zs9ZK24eb7dHJ2RmVLkid9qBOE+62A81Z1bKDq7QrICGyd7MFgwk9WzfcbafrkbmoA rKzk6uScE9+PpM9O2CV4FyRbXIgBAHi2w/RdW63nv5RcQ76z+ePDpWIwk5VZpPKd1Uts jvm0cEYqiaXUBQm5G9wapw3coAwgXj6ezMa4I5aUXHuntjxXEEZAl0EkipdeXysB7Gk7 qiFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id z27si20831696pfk.81.2019.10.02.05.03.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 05:03:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 434B089826; Wed, 2 Oct 2019 12:03:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id 966DE89826; Wed, 2 Oct 2019 12:03:32 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mzhar-1htpHS1ojh-00vhrB; Wed, 02 Oct 2019 14:03:27 +0200 From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 6/6] [RESEND] drm/amdgpu: work around llvm bug #42576 Date: Wed, 2 Oct 2019 14:01:27 +0200 Message-Id: <20191002120136.1777161-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191002120136.1777161-1-arnd@arndb.de> References: <20191002120136.1777161-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:YNsgZzHNCw392v1rgjHTUEZ8pz20uykSXH754RL9iIOb5deh2YJ VniPYenT1ADFLCFsCzgfROvSsNEN3OnGKEcwzAbZX+eQqWv1FYpwjvY8qgQaQWagz6gA/Hj n50Orae4/jwItelwmwUM+w8MCNKZ1bodhPFaG7DBNsILr42QtEuWuTsTPF+I9vNTWhFwdKi AC2C3ZG7mUNQXMnuZ9GNg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:4D48kbU58hA=:M0Ukpx58xOP2bgAOCbesZg Ll3K2WKrJMuAIV0rQMg3YrjRgy0vn19WxNhnTpIkrflyRiZWcJOM0wBeRuWKJeyvUs0Rmo5L2 WT/4Q04J4mCDT0lGHrQHxf0CSt7FRwbIaoymM8ll6+AnjlipM3gBW2vuD399wywXHODhQH/Jj kmmHm0vPKelSxnjmyF5QKhW2vPKNuNrxHXBAuShJhblFiaT4Tpite+9Tpqz5t78Mv1d0c4+St IPO467Ji+f+nalLEiSfYfSOueaNIp0Zh2ECvF8gYGuCtq4mQgaFQma45iRPDMa0dLQp2LPHv5 s3HOgLJcrW3+YLL3OgrgSAIqY/JojFmQs6jVGI3Y/iaIHFpiWRvNCCVqhadcZDljlJ6/isT3C cWMwh3wga4zB1HZAibk87TdIUOsEWosHOOSejWot8HMi7thZpGsmWSYlpaZpcggNF8Y5ef5cx S+AFB9lJCv6tLjnDzT5CItgHD9CSDilvn5DV5AQ2CSUe7CMLtj7FRRuRtxGnzKXWHsDiqUK2X dLpSNCwET1M9ENlBeQ5D+BhxBx37HFEUhCYKyJqFJoQbTkGvZkwazmwaChizrxq1gbyD4vDeD GqCyA1nhBCBAM2hW+2uyIFVsDMDpeg/OoBtcZMPB8aPwvr2q464wcpu+nmB0VWQnFJx8hRRKp kx+eBUDSoB7gkuurGSeum9uDonECxoSFhh//75/Bmdr0Te33FTyRIMUwkUlAfiVlOVC5ga602 HNuDLNkHHth6E821u1odV2gGvJVg9mgsLl5k0rHpfHXjU15zA2Ww4I8gM2c4ZgC5ypKzC/eg5 iac5xdsyiVk9Kf4KiWNLvvcteewurG0ZAiyq3Yo5GGXvCGBgLkIfnziVSp+lP21xvwWwPUCJr pxfok2TuNB12F2uGor0g== 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: Arnd Bergmann , Le Ma , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, clang-built-linux@googlegroups.com, Huang Rui , amd-gfx@lists.freedesktop.org, Hawking Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Code in the amdgpu driver triggers a bug when using clang to build an arm64 kernel: /tmp/sdma_v4_0-f95fd3.s: Assembler messages: /tmp/sdma_v4_0-f95fd3.s:44: Error: selected processor does not support `bfc w0,#1,#5' I expect this to be fixed in llvm soon, but we can also work around it by inserting a barrier() that prevents the optimization. Link: https://bugs.llvm.org/show_bug.cgi?id=42576 Signed-off-by: Arnd Bergmann --- Apparently this bug is still present in both the released clang-9 and the current development version of clang-10. I was hoping we would not need a workaround in clang-9+, but it seems that we do. --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c index 78452cf0115d..39459cd8ddef 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -961,6 +961,7 @@ static uint32_t sdma_v4_0_rb_cntl(struct amdgpu_ring *ring, uint32_t rb_cntl) /* Set ring buffer size in dwords */ uint32_t rb_bufsz = order_base_2(ring->ring_size / 4); + barrier(); /* work around https://bugs.llvm.org/show_bug.cgi?id=42576 */ rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_GFX_RB_CNTL, RB_SIZE, rb_bufsz); #ifdef __BIG_ENDIAN rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_GFX_RB_CNTL, RB_SWAP_ENABLE, 1);