[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <560ca37f-74c3-8f36-c118-eb17f92e20b3@starfivetech.com>
Date: Tue, 11 Jul 2023 09:44:15 +0800
From: Keith Zhao <keith.zhao@...rfivetech.com>
To: Shengyu Qu <wiagn233@...look.com>,
<dri-devel@...ts.freedesktop.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
<linux-media@...r.kernel.org>, <linaro-mm-sig@...ts.linaro.org>
CC: David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
"Rob Herring" <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
"Emil Renner Berthing" <kernel@...il.dk>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sumit Semwal <sumit.semwal@...aro.org>,
<christian.koenig@....com>, Bjorn Andersson <andersson@...nel.org>,
"Heiko Stuebner" <heiko@...ech.de>,
Shawn Guo <shawnguo@...nel.org>, Jagan Teki <jagan@...eble.ai>,
Chris Morgan <macromorgan@...mail.com>,
Jack Zhu <jack.zhu@...rfivetech.com>,
Shengyang Chen <shengyang.chen@...rfivetech.com>,
Changhuang Liang <changhuang.liang@...rfivetech.com>
Subject: Re: [PATCH 7/9] drm/verisilicon: Add drm plane funcs
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
Powered by blists - more mailing lists