Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2381471pxb; Mon, 11 Jan 2021 08:15:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwk57P7ZxJXYd5fku8617lDts1EeX+2SyXDlJTfc+p0O+UbDFWdDSfNNcFkX0KFEqyq4FPD X-Received: by 2002:a17:906:6d47:: with SMTP id a7mr166678ejt.340.1610381724622; Mon, 11 Jan 2021 08:15:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610381724; cv=none; d=google.com; s=arc-20160816; b=n0Exia9MeC2QbxqplFqhHeVZ+TPTtzkoau0znnnUIJrIROqK6WdqNL5jfvKR8vihW/ 8QRNTM8P0nXSjauBauczKwrv8xX3hqr8rVMhgZnkREVHVasTBN/qO8xSqkeYp2F7T02+ l8l2asMKfNuaXxwOg2JGWXAv5tyWyliWRv08/+rIZpTlP+ROxEhaDQLrbW+b3A3MDIEC OEhGMYtO6BbyD2rWXS/zTNMF/EHG9NzE8AuoW62TPoKmC6DFGaTQtZ+RW3wXCfounKIJ yK64NNNik4e8q5ygRt7Goz0RmjID10Q6aPD5BMl1O7K1sOqO98uMDttlarYg8GuluubB 2B8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dmarc-filter:sender:dkim-signature; bh=P5+Mis721Z6vZ3WqvVWUlOlPJxsnwl96h64oYHY/Qv4=; b=wTf/PCeCyl7HHyrz6k4cMMzSq2drdFwQbsc/zxdjs2UTgCXCkBsdsEHbM6Bp/rNRJv kl4HT5+7L+OAdBpzx4d+fdZVxxkWV1V0PW1ABsCVeWIBxaheF5/o4r0ZmteV0Ft6NRey 5/YAGX3PxClZhlNCFU8eMOb0HW8SOvXcu92l0OymTFt7n4ZaJVbhXxau9gVjLtCdEGNA /JfpDRnwYu7Z5q+Wvamq7Syh4K2QghvYngylsIKUmOhLI3O2vzkGUEHVV72oFx5SbcKD VAows5G2lCIaos6dlVOyTB0blJ+8USRUrIfUYFeToXv+n9IBl/7qZbOe9Wzr8r44iR2k CsDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=AN3fNe1W; 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 b26si6807120ejz.630.2021.01.11.08.15.00; Mon, 11 Jan 2021 08:15:24 -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=AN3fNe1W; 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 S1732179AbhAKQM2 (ORCPT + 99 others); Mon, 11 Jan 2021 11:12:28 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:41016 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730426AbhAKQM1 (ORCPT ); Mon, 11 Jan 2021 11:12:27 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610381524; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=P5+Mis721Z6vZ3WqvVWUlOlPJxsnwl96h64oYHY/Qv4=; b=AN3fNe1Wco8BjwLtmEdXtAwI/p/huZDkTJ36s172Pbce9Y3eNjHkcUclhwhXAnoRIO2CXvPc setm2JgsiHyvBIT9SrDA8Ac4iJ0C4ZSFc7UwEjIxyhDWpL9Djr8EcaVvzTImLXoq6eipOUz1 /2zAm4dBjfFcQQ2HU6RHEInLX2s= 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-n05.prod.us-west-2.postgun.com with SMTP id 5ffc78ab415a6293c5a395fc (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 11 Jan 2021 16:11:23 GMT Sender: jcrouse=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 95A15C43466; Mon, 11 Jan 2021 16:11:22 +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,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from jcrouse1-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse) by smtp.codeaurora.org (Postfix) with ESMTPSA id BAD3DC43463; Mon, 11 Jan 2021 16:11:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BAD3DC43463 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=jcrouse@codeaurora.org Date: Mon, 11 Jan 2021 09:11:15 -0700 From: Jordan Crouse To: Sai Prakash Ranjan 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 Message-ID: <20210111161115.GB29638@jcrouse1-lnx.qualcomm.com> Mail-Followup-To: Sai Prakash Ranjan , 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 References: <20210108122601.14993-1-saiprakash.ranjan@codeaurora.org> <43c8779bc5f03be2e8072c6484dfcabb@codeaurora.org> <73609df52188588bf7d023e16a706a7a@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73609df52188588bf7d023e16a706a7a@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Jordan > Thanks, > Sai > > -- > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member > of Code Aurora Forum, hosted by The Linux Foundation -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project