From patchwork Wed Mar 31 14:02:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 412877 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp515902jai; Wed, 31 Mar 2021 07:02:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd/MTFQlCzo+33PBqTB/WkkbJXOdXMIWCY+Y/ge6o+RcZuKD8t0zlhF7SV/HVTUXreiKps X-Received: by 2002:a62:8485:0:b029:1fc:d912:67d6 with SMTP id k127-20020a6284850000b02901fcd91267d6mr3108582pfd.80.1617199349812; Wed, 31 Mar 2021 07:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617199349; cv=none; d=google.com; s=arc-20160816; b=OWZfSctjnvukfe3csRLeyUhOWJbqLuW1s7PjME3yZ39cUpLnD1+0+qZP1B4G/I9Rpe /pYO6IvIS1BQTm7E+s1y4dPdBr+vjte0r+SnfXWnHS6BuyBGHpJIxBBWSuAfxHjFOT4k 2tLN19MjxZfKL5+P3bHPD3XaZHIq59W29MI++Pv8ql+wmMgfcFakpe0JZh3ANyvPpGrZ a9lNyPvHxgq9mE9lt8aW80My99MfZG5xpTYatvv+bXx8RaqQilJc+vToabTIg9jw20Mk Jwy/TGA2lAOk2qU14ZuurLnL3rh498oErsZMi6OSqZ8CgYZrDOWjqCNdrXL8DdLxs72k uCsQ== 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:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=cnzJ7+faNgDg6rnF97vKIS2NqAFTrIzmCWLjA1jDXO0=; b=Du0FdH+MK8OwE/TOY5AgijZm/z298DdDXNUlbmRyo8wlbIyG43SwS9aa+KNV8SWTMB dXcm/4KN9pqkbs96s0W8rvCdD/z7zLOIWgIo+zzGvOHC8MEKi9j69uv82HifytET63ve wtaUzRlSYow1l/tQgPgaBwfzhlqllOkWd/LztzumkutXBrGDvoNLPDuhBBzQ5b2QqGbd QgCBjEA20L2+I40f/V1DSOq60bkYKh/pkZ24l4aespWs6IsK4hxmWKS28CPxyuti/E1y +dNSimmhMY+u6fp91s69sLFI+dnvHOQ4bJwMVGYjaIBvkK8CAKpTQkWsTNU0+/2F98F0 rGJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=l2L1151w; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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 i36si2429891pgb.334.2021.03.31.07.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 07:02:29 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=l2L1151w; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 985436EAA5; Wed, 31 Mar 2021 14:02:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id 23C4E6EAA5 for ; Wed, 31 Mar 2021 14:02:26 +0000 (UTC) Received: by mail-lj1-x235.google.com with SMTP id u10so23996653lju.7 for ; Wed, 31 Mar 2021 07:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MuZeoVHEvpr+twaPQswyeU0R2hfnHxepbRcYA7KH75o=; b=l2L1151wnl4+sV7aqaC0RpYZ079X1QdGAxyQCBF1iuFD7wABWyAUSHIto1S6x+Wo2f jhdUJCof/A4cyK5X1JqLk2kJRYHYt9cWaasAfERA2gpRvfvxL0yo/d8mamjt7+WVUEi6 XLstzAle4OxKEzzYhB+4xIpBQhT620M7p6lO9aILLRyMqZIuBC9KVR4P7R7hAqXlVkCd GwkSNnDzCUMJRaP0YPlh78rEjATEpy4b8ykGhenOQGgvzQ1FFrRBA5idJNbTEkl2sIZ8 xO4nEIK7CWmmi1iX/DzFy0qHrpHOGAgKHPVqUFFGn3lg4BkEaEePuvZCnTbHe6Lrd57k o8TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MuZeoVHEvpr+twaPQswyeU0R2hfnHxepbRcYA7KH75o=; b=sQt0Z6ZMDHrB7zkIcEZuhAG1Ck1Fs4DNkFajLzxpRi3ykpkLaZMViRKNWC51FCg8lF rLL35fm6o6SBSnB2cPPUlsh2mxg8XCbnjj415m7WQGkrFLiOlWe81Rrk13Cb6jqn/fki NTrlxxFqYKQicmFjPAPQU7p9DisH3giEGBqfgpMJNUfvaY52SRWSq4GgOKIK9KDz5IL6 MJfcW7IExCmC3Tx1LbVmiln/+78CFpvc6GM97065WcmjlWc0prkXO9XtAbgnkfIrwsoa jgokGY2vZKlY+urkd3M5Z+2sKTDyyXhmKK6idwPWctOIeUI/bSZ+Mbu1nBBhkQAf5+2k ugIw== X-Gm-Message-State: AOAM533bHaO9Y3f0jarxDBLN3rPF61XcNFWpw3gf4mrMDi0LWZMk8PYa C7oYhiVjVY+s4fix+BFoZzbHBA== X-Received: by 2002:a2e:320c:: with SMTP id y12mr2250115ljy.360.1617199344558; Wed, 31 Mar 2021 07:02:24 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id r123sm245033lff.27.2021.03.31.07.02.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Mar 2021 07:02:24 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Jonathan Marek Subject: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode Date: Wed, 31 Mar 2021 17:02:23 +0300 Message-Id: <20210331140223.3771449-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, Akhil P Oommen , dri-devel@lists.freedesktop.org, David Airlie , Jordan Crouse , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" I suppose the microcode version check for a650 is incorrect. It checks for the version 1.95, while the firmware released have major version of 0: 0.91 (vulnerable), 0.99 (fixing the issue). Lower version requirements to accept firmware 0.99. Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe") Cc: Akhil P Oommen Cc: Jordan Crouse Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.30.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Acked-by: Jordan Crouse diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index cb2df8736ca8..896b47dc9c85 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu, } else { /* * a650 tier targets don't need whereami but still need to be - * equal to or newer than 1.95 for other security fixes + * equal to or newer than 0.95 for other security fixes */ if (adreno_is_a650(adreno_gpu)) { - if ((buf[0] & 0xfff) >= 0x195) { + if ((buf[0] & 0xfff) >= 0x095) { ret = true; goto out; } DRM_DEV_ERROR(&gpu->pdev->dev, "a650 SQE ucode is too old. Have version %x need at least %x\n", - buf[0] & 0xfff, 0x195); + buf[0] & 0xfff, 0x095); } /*