Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35649218rwd; Mon, 10 Jul 2023 10:21:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlHY4dEoXn9Ln9w4ji2DZp5Q1GSGs+zybgMr5Pk/wIlI9LnBNsCghZKbrHBwnTe8D4fsCt4R X-Received: by 2002:a17:906:1804:b0:992:a90a:5d1f with SMTP id v4-20020a170906180400b00992a90a5d1fmr12752208eje.68.1689009676202; Mon, 10 Jul 2023 10:21:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689009676; cv=pass; d=google.com; s=arc-20160816; b=K0FZhQsHH2s2Mp8bW5/dgol7lDVkkyFdRXcVcA6BxvVLw9jHaIbLx7jFzzGChtcbW8 Wo/WwT+1HJ/11DvxQti5YCO4iLFnr/P83nW/QBLvg6QUtMNRKYJFdrMqSSkmX8W+L1RY RBA+Es748YlJ4+Rqi6FIqvAs6dmZ60IMjQ4vUOGqoq2GAMsPiBBmV/bv+/mRGyU8DgJQ AHd2bSHaxhsHd/6LMdJ7JxIwHaggI7DNuj2Bb0HussHvO7OcxSb1dZAyYtehckxvkp9n EOn7Nq8G9QpxNIKRDonoVL4xGBOe2LWAqR+xbdcXzx0Lm6iYUyZg06Jfgf+Y9ZVPjFxp lXGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:to:subject:cc:user-agent:date :message-id:dkim-signature; bh=OtXbyaTR1eSXD3IOgjkAQzVYxlRNgHriDX/4FLu8tx8=; fh=QRwg51uOL3iM9XpUg4gCIHQDdRRuNL6L7ZWmza1J9wU=; b=BGLb+A/iztLW8oIAWYDEaDZZaGuYLB6si2yTXk4h3SXW9WzW/DLn9fSkl8Ligw9glL WnbK4xt9naJ3aUs/s4rsDc88T4IGYyZ+uY/6lf92xnzgPc4O9PKbwlKGWefVIgKcOkk1 GPw7DPMdo7NX3jWdyGRg6yQKmjgGxa+urmHtsesfVUBLtJZiFdJgRV0rrsQTQWce4DCT X6n5U/H79pgaeqAscDDZUtEkSP66DKtNHSb0OAg4l7m3dmLSPIQhoKmIO14TGq/VhxXy dl0aeUA0h9bINv5Rgaa/SncHr0NqgDX9qsdyQfuDABWgaShJe8vuKW45aRrZ+za6MpbX zvKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=qaqHPJfs; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a170906075200b00988fc062668si12454ejb.446.2023.07.10.10.20.50; Mon, 10 Jul 2023 10:21:16 -0700 (PDT) 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; dkim=pass header.i=@outlook.com header.s=selector1 header.b=qaqHPJfs; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbjGJQqX (ORCPT + 99 others); Mon, 10 Jul 2023 12:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbjGJQqV (ORCPT ); Mon, 10 Jul 2023 12:46:21 -0400 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2076.outbound.protection.outlook.com [40.92.98.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683E012E; Mon, 10 Jul 2023 09:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLdFMV2kDdRRFwMVZ061TsZ9MSlnxSZNx54I0jvVaNJhK6lLYU9BzJzkLxFDfygJax3l+HjY1WDTHN+efX6BCi0htyi2aekPDoqezMauBr7+1X7vj7c8wc8uJPM2d7qbNz3v8ctHNVOKX330n1rPcacTCagimXgmbSJgmEXBqHzl9gTiLr/S0Za1ueq0GaRqVlqrJ/4lgalT3a6/DcwuCnU89hHhb7UXB5ppRSPoT/jB4armd35Rk+KClwigWhFpnvqVt3VH2O1fkik0ZU+Gpbo16Mwz4beSfkrgYebfO1/kcfr2fm/t/Uo2+cPHRLxkBcSiDmPEZpJ1lHtETOuAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OtXbyaTR1eSXD3IOgjkAQzVYxlRNgHriDX/4FLu8tx8=; b=WaUJXkc2OALY4LIjbenXgB9XH0USomtAtvx8WcPzoab3xdnYfnMdgon7Auq1bU2l2NCzwKr0I/Oa9vh2Hwh7wEy6S56hXHIIlgzzHVSyiE8sEyf+ge8YE7jF8ixXdI1TOmZqjLkMmQfpf+T7GermrTAJOUPmPp1AB8AUMGhukb3DOh63hmTXZe0/sNmvYzCrLqroKR4xxGDG5jW8v6Vt3qfQPjrNJErLH3D0r7D5GL4/RynoDSjhwyDnVS9Tv3yicLAlLpfv5tCJwVxNFPBhd5MxU97MtgL8+XrDzeU71GTO2riZx4tKTWUs2UVsYO+NQ9x0fG7rGFNsCqJXPd9m9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OtXbyaTR1eSXD3IOgjkAQzVYxlRNgHriDX/4FLu8tx8=; b=qaqHPJfsiTy03A7+Ch3Jy5WQ2ke7jZbYxl58Crnah2yZiLPzcgfQD+dgqaYgmIxq3SNBxYoNP4lE6oxvfemGCEIzOqHlg1NF2g8KJkNjDxFF7231P31l8PFlR50rCw6uk7cucXfG9HLDV90ki/yGzDRDWh7AT9AzSYytDmVzkbM65EjQZ5wwzV5Ef3t0gMtdKwjmCYegi/LA1xcH4kEJviGSNSCaIIAJGCWbWF866c3NTd736m1o213NsNKyLjqSD+OlkkMwBaa6QTs/caEkRl1Rt4tHYRNJypBe68F1ccn4tPUeyHWXxNLJPqNgxe4mUN7uFJgs7BM1yI14C01d+w== Received: from TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:23e::10) by OS3P286MB3386.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:214::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.31; Mon, 10 Jul 2023 16:46:13 +0000 Received: from TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM ([fe80::3794:d6cb:1aa2:342e]) by TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM ([fe80::3794:d6cb:1aa2:342e%7]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 16:46:13 +0000 Message-ID: Date: Tue, 11 Jul 2023 00:46:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Cc: wiagn233@outlook.com, David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Paul Walmsley , Palmer Dabbelt , Albert Ou , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , Sumit Semwal , christian.koenig@amd.com, Bjorn Andersson , Heiko Stuebner , Shawn Guo , Jagan Teki , Chris Morgan , Jack Zhu , Shengyang Chen , Changhuang Liang Subject: Re: [PATCH 7/9] drm/verisilicon: Add drm plane funcs To: Keith Zhao , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org References: <20230602074043.33872-1-keith.zhao@starfivetech.com> <20230602074043.33872-8-keith.zhao@starfivetech.com> From: Shengyu Qu In-Reply-To: <20230602074043.33872-8-keith.zhao@starfivetech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [ckAf4fRsxL5VXSkCBt9Dec8pYHmYIjKPXdK6cpxYssf8QtV8xRsCWP8qdmovhcE1] X-ClientProxiedBy: SI2PR01CA0026.apcprd01.prod.exchangelabs.com (2603:1096:4:192::16) To TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:23e::10) X-Microsoft-Original-Message-ID: <828bb5bd-5399-d862-da50-777a18abb1ae@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY3P286MB2611:EE_|OS3P286MB3386:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f4cd8b4-d2cd-4069-232c-08db81652ba3 X-MS-Exchange-SLBlob-MailProps: YfhX3sd/0TXxo7p6a+r8y0O/enmghtvt/7B0XQiDFw97JQYi4R3wn0/kvzOy2dBq5acmuwq27m8KXLAofj2BZWX7YxIKQ+GWUfrh043IYOGP+V57W8/xVPBHIVFjlCrnDgtrcYE7Iei4LYfcpcIkJu42h8vcVCKNJ3U4TvKvGRHG52XVy0gwFm0DQPws+ymXyF8BO9NHo9J74TNq0ICYiZ1G8Azs0Jkxb3icTk8dn+AIVVnJsRR/YJPPmHTZ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nhydWd6MXRpbWhwMVdyNlgxVjRCZFJjUS9QbG5PY0tJZnpROEV5T3BzRGJq?= =?utf-8?B?NDhsbmNIbWw4dXRxSFlCTzRmanc2blJ0cTdZMmhaUGFJM012Z1BFRldKSFZi?= =?utf-8?B?SStuYWNpTXFPTFhYbFhUWlVOdTRKK0ljaVFZbG16M00wVXJxYm0yWk5RPT0=?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f4cd8b4-d2cd-4069-232c-08db81652ba3 X-MS-Exchange-CrossTenant-AuthSource: TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 16:46:13.1212 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3P286MB3386 X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_MUA_MOZILLA, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,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 Hello Keith, > + > +static void vs_plane_atomic_update(struct drm_plane *plane, > + struct drm_atomic_state *state) > +{ > + struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, > + plane); > + unsigned char i, num_planes; > + struct drm_framebuffer *fb; > + struct vs_plane *vs_plane = to_vs_plane(plane); > + //struct drm_plane_state *state = plane->state; > + struct vs_crtc *vs_crtc = to_vs_crtc(new_state->crtc); > + struct vs_plane_state *plane_state = to_vs_plane_state(new_state); > + //struct drm_format_name_buf *name = &plane_state->status.format_name; > + > + if (!new_state->fb || !new_state->crtc) > + return; > + > + fb = new_state->fb; > + > + num_planes = vs_get_plane_number(fb); > + > + for (i = 0; i < num_planes; i++) { > + struct vs_gem_object *vs_obj; > + > + vs_obj = vs_fb_get_gem_obj(fb, i); > + vs_plane->dma_addr[i] = vs_obj->iova + fb->offsets[i]; There is a dcache flush operation here in downstream driver. Is that a cache coherence problem? Best regards, Shengyu > + } > + > + plane_state->status.src = drm_plane_state_src(new_state); > + plane_state->status.dest = drm_plane_state_dest(new_state); > + > + vs_plane->funcs->update(vs_crtc->dev, vs_plane, plane, state); > +} >