Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp946184pxb; Wed, 16 Feb 2022 07:43:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+SJu/tuuoLwnnMHSpp+LCFzTDtjpcOoqr2pidXbLzTgUhDbklb2RDZUy+26YSF8HtlcSH X-Received: by 2002:a17:907:2bd1:b0:6ce:484:f653 with SMTP id gv17-20020a1709072bd100b006ce0484f653mr2707048ejc.391.1645026180170; Wed, 16 Feb 2022 07:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645026180; cv=none; d=google.com; s=arc-20160816; b=fg9TArCEwnWct/ixZEsAP+zK5Hbic8ueJOkz7UrY89SaZd1hn9EjwIpN/e9LK3ymHi tRKib3fA4FD5nM/tHSFPGVxTjHhTvR0e2uwBH7s7xwYb+tMgDmaVuSevgWFe9YtSv2OK f5k6m/cWJThT2GRrou9398lNZXED+rNyaPDU22Vj8UU7lKjk5mA26toVwCYVaF6NywKu Vs23rvCcxOTWb4E0Bmzd1kCgyKq7CJp0I0vhovGOe6dRrkSMqM8vopEQnzBI8BeQmRX8 vO+vemTR7WlEwXYbFcljmCf4VU4zJE8XySL6b4pQu/3kaCy1gejqawlRT2WXfug/Bsha H6qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:hmm_source_type:hmm_attache_num :hmm_source_ip; bh=rPU150+DAxWkH3V7FDtieoHOPdfFNa9johK9Z8q2wxQ=; b=iTLezqQcSx8zjhWcyOgY+jZZGyhU3aHKzg93S0yc2x8gfw7LbLoCu0wh5hiCQdGRG7 a86K0HDcp6GVyQVgjLuBZGmCLfP2/cY3niAh1oIl2ZnQhdAxEpRoX7BgCAuEi4XxHB23 is2pJx7nH1iHdeubfC40CstMfFxO5c6l057qQI3Gxa3uxoKifpOGU3eIMPQ5OhX8KbFb 7CE94cqMUX8X6soM/sQpoLIKxOKKoR7XMyl1g4T3pKvmnrdRSmMtz0eJyaGgVle0yPcP 0kyg8c/4dZQLdVATOVsRQdti3E58r6Ep13AJPm8gmqVB4FtU5ks33F/TUGvh2vHKld69 XeFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6si31968ejs.855.2022.02.16.07.42.24; Wed, 16 Feb 2022 07:43:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234884AbiBPON2 (ORCPT + 99 others); Wed, 16 Feb 2022 09:13:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233931AbiBPON0 (ORCPT ); Wed, 16 Feb 2022 09:13:26 -0500 Received: from 189.cn (ptr.189.cn [183.61.185.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2AE221F5F8; Wed, 16 Feb 2022 06:13:11 -0800 (PST) HMM_SOURCE_IP: 10.64.8.43:41724.2129254537 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 2B970100238; Wed, 16 Feb 2022 22:13:07 +0800 (CST) Received: from ([172.27.8.53]) by gateway-151646-dep-b7fbf7d79-vjdjk with ESMTP id b3dbb3be09af45109d798cf10be5fd16 for daniel@fooishbar.org; Wed, 16 Feb 2022 22:13:09 CST X-Transaction-ID: b3dbb3be09af45109d798cf10be5fd16 X-Real-From: 15330273260@189.cn X-Receive-IP: 172.27.8.53 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn Message-ID: Date: Wed, 16 Feb 2022 22:13:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v6 1/3] drm/lsdc: add drm driver for loongson display controller Content-Language: en-US To: Daniel Stone Cc: Maxime Ripard , Thomas Bogendoerfer , suijingfeng , David Airlie , dri-devel@lists.freedesktop.org, Randy Dunlap , Roland Scheidegger , linux-mips@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Andrey Zhizhikin , Rob Herring , Dan Carpenter , Sam Ravnborg References: <20220203082546.3099-1-15330273260@189.cn> <20220203082546.3099-2-15330273260@189.cn> <20220203085851.yqstkfgt4dz7rcnw@houat> <20220209084331.fpq5ng3yuqxmby4q@houat> From: Sui Jingfeng <15330273260@189.cn> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/2/16 21:46, Daniel Stone wrote: > On Wed, 9 Feb 2022 at 15:41, Sui Jingfeng <15330273260@189.cn> wrote: >> On 2022/2/9 16:43, Maxime Ripard wrote: >>> More fundamentally (and this extends to the CMA, caching and VRAM stuff >>> you explained above), why can't the driver pick the right decision all >>> the time and why would that be under the user control? >> The right decision for ls7a1000 is to use VRAM based helper, But sometimes >> we need CMA helper based solution. Because: The PRIME support is lost, use >> lsdc with etnaviv is not possible any more. >> >> Buffer sharing with etnaviv is no longer possible, loongson display controllers >> are simple which require scanout buffers to be physically contiguous. > Other systems have this limitation, and Mesa's 'kmsro' concept makes > this work transparently, as long as your driver can export dmabufs > when running in 'VRAM' mode. > > Cheers, > Daniel When using vram helper based driver, the framebuffer  is locate at video ram. the backing memory fb is manage by TTM. while bo of etnaviv is locate at system ram. Currently i can't figure out how does the buffer going to be shared.