Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36175410rwd; Mon, 10 Jul 2023 19:35:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGH2LGhfRihqGt9jhc4flNxmOf6AbmyU0TUB6BBAN3EZQ3FTYaaEY5H2fRLQZdrj1pHmki3 X-Received: by 2002:a05:6358:702:b0:134:e41a:9227 with SMTP id e2-20020a056358070200b00134e41a9227mr11967093rwj.5.1689042944178; Mon, 10 Jul 2023 19:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689042944; cv=none; d=google.com; s=arc-20160816; b=A21BvBWdQVbGLOZ48A5pClHxBF/RmBHd9Ouut2kTkj+R3pv7KbNMWwN4O7BZ8wtRCf IYZT8IE0fuGFnLt2de1Qi4u1JpnzNEgy7axLAWJyqW3aJ/1LpUgLqOUQHSSrkceAc3p1 oL66w7RIxyHTvuVQL2J4HKn7YIsGL1Ffxq51JBn3om/SO9rH7kpA4VRlNGooFqjqxqw4 ygXVxg0qNu7x5S8Drmr7LXrJhyktbLjok7BRkHt431FZ3NnaYYFZGToMhLLAAz/qy70U XjAOUvPmRuwImkieQwEaBKbFJq3/keCtfD9O4pYhad+huafQviEnL2Semj9MwrjeWV9c chSQ== 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; bh=OE+SaalVfdn3uZApfFPVfZZcQG0SY+PNLmaSZ8zXOUk=; fh=motzv6UHPw6Lp/qFomFLwH4qrb+OXOlJDoTpMEG+hos=; b=q6MLqu9k0gwF11u9QjG2ociUE28dOGZysEzhwnfk7K2ju6f62Pv1Z6miCCmaq0EpA4 qyelrGvI1EjvLnDfHX75yXqX8To3+TdC36lA9onKGhz3x0TUvU7urvcre3exYWd4MCGg PI8gNCvP/VT0N+dUUJMrnwmIbq8R9cknHDMVr9ZvuZ4Tyd6k6QNuGULA+2JSKD6ItiHy 99TtyqzDNna21eRuuRItLK1C3LJPqMd7/OsrUe3669p/SpS/S43s3lY7Pqvek4QAUmkJ zH6dRRgvxnT4M3cWe5/+JKraOt9+b+dMw2qu+Sa2bD3+5oTBOltx0Mkadsoy8noeVY6w 9u+w== 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 s193-20020a632cca000000b00553859c59c1si634434pgs.695.2023.07.10.19.35.31; Mon, 10 Jul 2023 19:35:44 -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; 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 S229907AbjGKBo1 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 10 Jul 2023 21:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjGKBo0 (ORCPT ); Mon, 10 Jul 2023 21:44:26 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D151A4; Mon, 10 Jul 2023 18:44:24 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 5D45A24DE03; Tue, 11 Jul 2023 09:44:16 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 11 Jul 2023 09:44:16 +0800 Received: from [192.168.60.133] (180.164.60.184) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 11 Jul 2023 09:44:15 +0800 Message-ID: <560ca37f-74c3-8f36-c118-eb17f92e20b3@starfivetech.com> Date: Tue, 11 Jul 2023 09:44:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 7/9] drm/verisilicon: Add drm plane funcs Content-Language: en-US To: Shengyu Qu , , , , , , CC: 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 , , Bjorn Andersson , "Heiko Stuebner" , Shawn Guo , Jagan Teki , Chris Morgan , Jack Zhu , Shengyang Chen , Changhuang Liang References: <20230602074043.33872-1-keith.zhao@starfivetech.com> <20230602074043.33872-8-keith.zhao@starfivetech.com> From: Keith Zhao In-Reply-To: Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [180.164.60.184] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 2023/7/11 0:46, Shengyu Qu wrote: > 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); >> +} >>yes , You can find that the current situation is very professional. This problem exists at present, but the dma interface is not perfect at now, and the dma_sync_single_for_device interface needs to be implemented later. I will consider repairing this problem in the form of patch