From patchwork Tue Nov 16 23:16:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 12692802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 853DAC433EF for ; Tue, 16 Nov 2021 23:17:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 402C261A3D for ; Tue, 16 Nov 2021 23:17:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 402C261A3D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6sDzIfav1s+RclndgfwB0kNuL6E4vkfMAdhTHDcvhg0=; b=4CaBg6lMhDac/m CqJIrKFicAlXlyLSofvmKY4ORGy4ZawyL3/ozsaChOvf7d/DJ9bl3H5OH5aqgSD5TiAw4B13YWGoa ZlnlI8QB3rFbF845cRNqaj4s3iArLB35fuFLhB4thYyY3is3y0/RNTklD9L1Fx+AL20alXDbMBo6a yY8djC1JYUplR4FpYcsbLolwplJuPjCRF0UnRnVseYsDqf0Y0f3x34ygiG2jb1YhpRhCAYXiopuAY 8uFresxhwjW1SiEIkN6lpDO0763aYaPuZl+Z5hmulHZla5MR3ybZMPM/3Xmqz/q2xoQJxKBkR/9hM 3LhyClBRBppGmCoqScRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn7gV-002vOP-Dn; Tue, 16 Nov 2021 23:16:15 +0000 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn7gR-002vMv-Nb for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 23:16:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1637104571; x=1668640571; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=yeFteD/GOh/C5MWeZrfpyg/JwJax0tb03uOPlANsVrg=; b=yGQxclgYuFY6YrfijqzQVXSSTH9P6sZY3dtmzL4Q6y4odwqHfWOwAkk8 8fuyjUnAgwbVh6FPeGe0loI5XKmi1L0gLuS5uaWN+e6cospayjxiL3HlB K0XQcpboJ2w5BSjyrCNVfhlmxlDUj3evTjSsbRpqR+3ZWYs9aVUEM8P2v 8=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 16 Nov 2021 15:16:08 -0800 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2021 15:16:08 -0800 Received: from th-lint-040.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 16 Nov 2021 15:16:08 -0800 From: Georgi Djakov To: , , CC: , , , , , , Subject: [RFC 2/2] drm/msm/gem: Make use of the system cache Date: Tue, 16 Nov 2021 15:16:00 -0800 Message-ID: <1637104560-37432-2-git-send-email-quic_c_gdjako@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1637104560-37432-1-git-send-email-quic_c_gdjako@quicinc.com> References: <1637104560-37432-1-git-send-email-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_151611_828451_9DFDCF2C X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of writing to WC cmdstream buffers that go all the way to the main memory, let's use the system cache to improve the performance. Signed-off-by: Georgi Djakov --- drivers/gpu/drm/msm/msm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 104fdfc14027..921a1c24721e 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -214,7 +214,7 @@ void msm_gem_put_pages(struct drm_gem_object *obj) static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot) { if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) - return pgprot_writecombine(prot); + return pgprot_syscached(prot); return prot; }