Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3441072pxb; Tue, 12 Jan 2021 15:02:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRiS+SJ2RkUkyZ5pDIkbFRDN7tATitBBRtCx3xTvSSf1UUgkwKuTqhte+sZeshS11KaiZH X-Received: by 2002:aa7:d148:: with SMTP id r8mr1145637edo.127.1610492525900; Tue, 12 Jan 2021 15:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610492525; cv=none; d=google.com; s=arc-20160816; b=SNEzhMC78WTl3q8EzmsXqTWgHZ3g0GHXeanO5BN8hjcnM6VfB3U10lr8UG+Nrq3qdc Jt3RDvMUf0i5yJIeM7thy6ubrH8Z59TgruY6oHjkSSyLoHJOVRUioH8+WFLAU1f0HwTb 3WCtzrF/wmjoiAR2/9b4pYNb8Zt1Zh9yXl1nQRCFowfA6p+SWtFoQoERsyR0QFqmY7Iu EyvD0+lkge90Pb/Jn1a7CGGC8Rovj2gvajx8UaygZHQSxWvk27WZ32iy0pgbcC4Zy1tB IC7loXLfyx9o0g9nJRg1R9DYv2dmq3oqwRCkkiJruGF/Upg6UwkoQ+1lCWwAP/Jwh7Ez 0X4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=J/gXo0SfG2tE4eEiy9hfkib22kuMNt3ssI4CovuJIXE=; b=ngX5tx7JplCqrkabaWYVr2zadXysSvFSMIcg1h04YDiXtRn9M9qFGCRqWQSKVcYmp/ BrDTUToUsyg17qoE+f03QN9BoxkV6SynwvblkzqMu1maf0FYs1xbAKo8tCKJ048nqVgi v3lZmEbPo6xWX8MjIJkSRDMa+K39S2e5NpUDFbfpbYVbKkm7Yv+Udh2jGNGoTzckVF6e TDB7at6Y/Ww2omRNnqHF9pk0/pMIZ4LYASrIukB9BUX4BSRVeDa58MxxEATN/pYTg+dR IoGmhR4OM2XK2Ix4++F4Yd8ERh02+SqPULA/BXhWoxaZelHI0GtCPdpdkTe95ujx/Pvq 2NwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=J8dAYNeV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si64792ejs.283.2021.01.12.15.01.41; Tue, 12 Jan 2021 15:02:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=J8dAYNeV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbhALGuU (ORCPT + 99 others); Tue, 12 Jan 2021 01:50:20 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:31442 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728453AbhALGuU (ORCPT ); Tue, 12 Jan 2021 01:50:20 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610434194; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=J/gXo0SfG2tE4eEiy9hfkib22kuMNt3ssI4CovuJIXE=; b=J8dAYNeVIKpku5Ssk09/ecJcxvfulB3n3FAdR3WszVLZBAEZ2u5hx1Xgf8HH/ZrwL/9ili+S ik3lqH2abeObiT8jVkmK4SWDBXfjNaO7WI0AEMn0afIScajBy7CqISPk2kbDvnxcjdc2oKOB FnRLv6XgStdDSlhRJv7797Eoz0Q= X-Mailgun-Sending-Ip: 69.72.43.15 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 5ffd4678415a6293c5d551e8 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 12 Jan 2021 06:49:28 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 7826FC43467; Tue, 12 Jan 2021 06:49:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2B029C433CA; Tue, 12 Jan 2021 06:49:27 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 12 Jan 2021 12:19:27 +0530 From: Sai Prakash Ranjan To: Jordan Crouse Cc: Rob Clark , Konrad Dybcio , Sean Paul , Jonathan , David Airlie , linux-arm-msm , Sharat Masetty , martin.botka@somainline.org, Akhil P Oommen , dri-devel , Bjorn Andersson , Shawn Guo , marijn.suijten@somainline.org, ~postmarketos/upstreaming@lists.sr.ht, Daniel Vetter , angelogioacchino.delregno@somainline.org, Dave Airlie , phone-devel@vger.kernel.org, freedreno , Linux Kernel Mailing List Subject: Re: [Freedreno] [PATCH] drm/msm: Only enable A6xx LLCC code on A6xx In-Reply-To: <20210111161115.GB29638@jcrouse1-lnx.qualcomm.com> References: <20210108122601.14993-1-saiprakash.ranjan@codeaurora.org> <43c8779bc5f03be2e8072c6484dfcabb@codeaurora.org> <73609df52188588bf7d023e16a706a7a@codeaurora.org> <20210111161115.GB29638@jcrouse1-lnx.qualcomm.com> Message-ID: X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jordan, On 2021-01-11 21:41, Jordan Crouse wrote: > On Mon, Jan 11, 2021 at 09:54:12AM +0530, Sai Prakash Ranjan wrote: >> Hi Rob, >> >> On 2021-01-08 22:16, Rob Clark wrote: >> >On Fri, Jan 8, 2021 at 6:05 AM Sai Prakash Ranjan >> > wrote: >> >> >> >>On 2021-01-08 19:09, Konrad Dybcio wrote: >> >>>> Konrad, can you please test this below change without your change? >> >>> >> >>> This brings no difference, a BUG still happens. We're still calling >> >>> to_a6xx_gpu on ANY device that's probed! Too bad it won't turn my A330 >> >>> into an A640.. >> >>> >> >>> Also, relying on disabling LLCC in the config is out of question as it >> >>> makes the arm32 kernel not compile with DRM/MSM and it just removes >> >>> the functionality on devices with a6xx.. (unless somebody removes the >> >>> dependency on it, which in my opinion is even worse and will cause >> >>> more problems for developers!). >> >>> >> >> >> >>Disabling LLCC is not the suggestion, I was under the impression that >> >>was the cause here for the smmu bug. Anyways, the check for llc slice >> >>in case llcc is disabled is not correct as well. I will send a patch for >> >>that as well. >> >> >> >>> The bigger question is how and why did that piece of code ever make it >> >>> to adreno_gpu.c and not a6xx_gpu.c? >> >>> >> >> >> >>My mistake, I will move it. >> > >> >Thanks, since we don't have kernel-CI coverage for gpu, and there >> >probably isn't one person who has all the different devices supported >> >(or enough hours in the day to test them all), it is probably >> >better/safer to keep things in the backend code that is specific to a >> >given generation. >> > >> >> Agreed, I will post this change soon and will introduce some feature >> check as well because we will need it for iommu prot flag as per >> discussion >> here - >> https://lore.kernel.org/lkml/20210108181830.GA5457@willie-the-truck/ >> >> >>> To solve it in a cleaner way I propose to move it to an a6xx-specific >> >>> file, or if it's going to be used with next-gen GPUs, perhaps manage >> >>> calling of this code via an adreno quirk/feature in adreno_device.c. >> >>> Now that I think about it, A5xx GPMU en/disable could probably managed >> >>> like that, instead of using tons of if-statements for each GPU model >> >>> that has it.. >> >>> >> >>> While we're at it, do ALL (and I truly do mean ALL, including the >> >>> low-end ones, this will be important later on) A6xx GPUs make use of >> >>> that feature? >> >>> >> >> >> >>I do not have a list of all A6XX GPUs with me currently, but from what >> >>I know, A618, A630, A640, A650 has the support. >> >> >> > >> >From the PoV of bringing up new a6xx, we should probably consider that >> >some of them may not *yet* have LLCC enabled. I have an 8cx laptop >> >and once I find time to get the display working, the next step would >> >be bringing up a680.. and I'd probably like to start without LLCC.. >> > >> >> Right, once I move the LLCC code to a6xx specific address space >> creation, >> without LLCC slices for GPU specified in qcom llcc driver, we will not >> be using it. > > Right. The problem here was that we were assuming an a6xx container in > generic > code. Testing the existence of LLCC or not is a different problem but > it is my > understanding that if we set the attribute without LLCC enabled it just > gets > ignored. Is that correct Sai? > Yes that is correct, I just confirmed now with LLCC team. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation