Hi,
On 2025/1/20 04:14, Laurent Pinchart wrote:
On Mon, Jan 20, 2025 at 12:26:30AM +0800, Sui Jingfeng wrote:
On 2025/1/19 23:22, Tomi Valkeinen wrote:
On 19/01/2025 16:59, Sui Jingfeng wrote:
But userspace must be able to continue allocating YUV buffers through
CREATE_DUMB.
I think
Hi,
On 2025/1/16 18:17, Geert Uytterhoeven wrote:
On Thu, Jan 16, 2025 at 11:03 AM Tomi Valkeinen
wrote:
On 16/01/2025 10:09, Thomas Zimmermann wrote:
Am 15.01.25 um 15:20 schrieb Tomi Valkeinen:
[...]
My point is that we have the current UAPI, and we have userspace using
it, but we don't ha
Hi,
On 2025/1/19 23:22, Tomi Valkeinen wrote:
On 19/01/2025 16:59, Sui Jingfeng wrote:
But userspace must be able to continue allocating YUV buffers through
CREATE_DUMB.
I think, allocating YUV buffers through CREATE_DUMB interface is just
an *abuse* and *misuse* of this API for now.
Take
Hi,
On 2025/1/19 20:18, Tomi Valkeinen wrote:
Hi,
On 19/01/2025 13:29, Sui Jingfeng wrote:
Hi,
On 2025/1/16 18:35, Dmitry Baryshkov wrote:
On Thu, Jan 16, 2025 at 11:17:50AM +0100, Geert Uytterhoeven wrote:
On Thu, Jan 16, 2025 at 11:03 AM Tomi Valkeinen
wrote:
On 16/01/2025 10:09
Hi,
On 2025/1/16 18:35, Dmitry Baryshkov wrote:
On Thu, Jan 16, 2025 at 11:17:50AM +0100, Geert Uytterhoeven wrote:
On Thu, Jan 16, 2025 at 11:03 AM Tomi Valkeinen
wrote:
On 16/01/2025 10:09, Thomas Zimmermann wrote:
Am 15.01.25 um 15:20 schrieb Tomi Valkeinen:
[...]
My point is that we hav
Hi,
On 2025/1/9 22:57, Thomas Zimmermann wrote:
Call drm_mode_size_dumb() to compute dumb-buffer scanline pitch and
buffer size. Align the pitch according to hardware requirements.
Signed-off-by: Thomas Zimmermann
Cc: Sui Jingfeng
Cc: Sui Jingfeng
Reviewed-by: Sui Jingfeng
Hi,
On 2024/12/2 22:57, Maxime Ripard wrote:
On Fri, Nov 29, 2024 at 11:16:50PM +0800, Chen-Yu Tsai wrote:
On Fri, Nov 29, 2024 at 10:55 PM Maxime Ripard wrote:
On Fri, Nov 29, 2024 at 10:12:02PM +0800, Sui Jingfeng wrote:
Hi,
On 2024/11/29 18:51, Maxime Ripard wrote:
On Wed, Nov 27, 2024
Hi,
On 2024/12/2 18:12, Maxime Ripard wrote:
On Fri, Nov 29, 2024 at 11:24:18PM +0800, Sui Jingfeng wrote:
Hi,
On 2024/11/29 22:54, Maxime Ripard wrote:
On Fri, Nov 29, 2024 at 10:12:02PM +0800, Sui Jingfeng wrote:
Hi,
On 2024/11/29 18:51, Maxime Ripard wrote:
On Wed, Nov 27, 2024 at 05
Hi,
On 2024/11/30 22:51, Markus Elfring wrote:
Because the of_dma_configure() will returns '-EPROBE_DEFER' if the probe
return?
…
Stop pretending that it will always suceess, quit if it fail.
succeed?
Hi,
On 2024/11/29 22:54, Maxime Ripard wrote:
On Fri, Nov 29, 2024 at 10:12:02PM +0800, Sui Jingfeng wrote:
Hi,
On 2024/11/29 18:51, Maxime Ripard wrote:
On Wed, Nov 27, 2024 at 05:58:31PM +0800, Chen-Yu Tsai wrote:
Revisiting this thread since I just stepped on the same problem on a
Hi,
On 2024/11/29 18:51, Maxime Ripard wrote:
On Wed, Nov 27, 2024 at 05:58:31PM +0800, Chen-Yu Tsai wrote:
Revisiting this thread since I just stepped on the same problem on a
different device.
On Thu, Nov 14, 2024 at 9:12 PM Maxime Ripard wrote:
On Tue, Oct 29, 2024 at 10:53:49PM +0800, Fe
Hi,
On 2024/11/29 12:52, Chen-Yu Tsai wrote:
On Thu, Nov 28, 2024 at 2:46 AM Sui Jingfeng wrote:
Hi,
On 2024/11/27 17:58, Chen-Yu Tsai wrote:
Revisiting this thread since I just stepped on the same problem on a
different device.
On Thu, Nov 14, 2024 at 9:12 PM Maxime Ripard wrote:
On Tue
Hi,
On 2024/11/25 17:33, Liu Ying wrote:
i.MX8qxp Display Controller display engine consists of all processing
units that operate in a display clock domain. Add minimal feature
support with FrameGen and TCon so that the engine can output display
timings. The display engine driver as a master b
Hi,
On 2024/11/25 17:33, Liu Ying wrote:
i.MX8qxp Display Controller display engine consists of all processing
units that operate in a display clock domain. Add minimal feature
support with FrameGen and TCon so that the engine can output display
timings.
The Frame Generator is used to generat
RH1288 V3.
Signed-off-by: Thomas Zimmermann
Reviewed-by: Sui Jingfeng
---
drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/Kconfig
b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
index 80253d39664a..93
Hi,
On 2024/11/27 17:58, Chen-Yu Tsai wrote:
Revisiting this thread since I just stepped on the same problem on a
different device.
On Thu, Nov 14, 2024 at 9:12 PM Maxime Ripard wrote:
On Tue, Oct 29, 2024 at 10:53:49PM +0800, Fei Shao wrote:
On Thu, Oct 24, 2024 at 8:36 PM Maxime Ripard wr
Hi,
Thanks. Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git
(drm-misc-next)
[1/1] drm/lsdc: Request PCI BAR
https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/ca053ee3c6a7a877754e6f444ce5f520e3c0a856
On 2024/11/25 22:02, Philipp Stanner wrote:
lsdc currently just io
those useless to upper caller
function.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index ff90bf8
The value of the 'iova' variable is the start GPUVA that is going to be
mapped, its value doesn't changed when the mapping is on going.
Replace it with the 'da' variable, which is incremental and it reflects
the actual address being mapped exactly.
Signed-off-by: Sui J
y report correct length of GPUVA
to kernel with desired alignment ensured.
With above statements agreed, drop the "offset in page" manipulation will
return us a correct implementation at any case.
Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver")
Signed-off-by:
ial cleanup which eliminates unnecessary overheads.
v2 -> v3
* Reword and improve commit message
v1 -> v2
* Reword and fix typos and mistakes
v1 Link: https://patchwork.freedesktop.org/series/140589/
Sui Jingfeng (3):
drm/etnaviv: Drop the offset in page manipulation
d
Hi,
On 2024/10/1 21:04, Lucas Stach wrote:
Hi Sui,
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng:
It will be called by drm_gem_print_info() if implemented, and it can
provide more information about the framebuffer objects.
Etnaviv GEM BOs are not framebuffer objects
m the system. Saving both memorys and times overhead because of that.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 64 +++---
1 file changed, 56 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
b/drivers/gpu/drm/et
The etnaviv_iommuv2_ensure_stlb() function have been replaced by the
etnaviv_iommuv2_ensure_stlb_new(), remove it.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 24 --
1 file changed, 24 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv
to the upper caller etnaviv_iommu_map() function. Which
reduce some extra overhead.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu
e actual status that GPUVA
is being mapped.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index ddb536d84c58..05021848126e 1
duce extra overhead. Waste
CPU circles, then is it correct and safe for us do some simplification
now?
v1 -> v2
* Reword and fix typos and mistakes
v1 Link: https://patchwork.freedesktop.org/series/140589/
Sui Jingfeng (3):
drm/etnaviv: Drop offset in page manipulation
drm/
naviv. This means
that all DMA addresses that sg_dma_address() gives us will be PAGE_SIZE
aligned, in other words, sg->offset will always equal to 0.
Drop those compulations about the offset of SG entries can save some
extra overhead.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnav
This patch switch to use sg_set_buf() and sg_dma_address() helpers, no
function change.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c
b/drivers/gpu/drm/i915
Because the of_dma_configure() will returns '-EPROBE_DEFER' if the probe
procedure of the specific platform IOMMU driver is not finished yet. It
can also return other error code for various reasons.
Stop pretending that it will always suceess, quit if it fail.
Signed-off-by: Su
naviv: call correct function when trying to vmap a
DMABUF")
Signed-off-by: Sui Jingfeng
---
Split from my PCIe device driver wrapper support series, since this probably
should be resend as a standalone patch.
v15: Use `obj->flags & ETNA_BO_CACHE_MASK` (Lucas)
---
drivers/gpu/drm/etna
a page from
DMA32 to etnaviv_bind().
Fixes: b72af445cd38 ("drm/etnaviv: request pages from DMA32 zone when needed")
Suggested-by: Sui Jingfeng
Signed-off-by: Xiaolei Wang
---
change log
v1:
https://patchwork.kernel.org/project/dri-devel/patch/20240806104733.2018783-1
nce all vivante GPUs in the system will share the same
DMA constraints, move the check of whether to get a page from
DMA32 to etnaviv_bind().
Fixes: b72af445cd38 ("drm/etnaviv: request pages from DMA32 zone when needed")
Suggested-by: Sui Jingfeng
Signed-off-by: Xiaolei Wang
---
The etnaviv_perfmon.h header is about performance monitor, it can hardly
has something to do with command buffer suballocator. Drop it.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv
Referencing the 'struct etnaviv_gpu *' by every etnaviv GEM BO is weird.
Drop it and drop yet another unused data field, namely 'access'.
Memory footprint of etnaviv GEM BOs reduced.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 --
1 file
On 2024/10/31 20:31, Neil Armstrong wrote:
On 30/10/2024 15:49, Sui Jingfeng wrote:
Hi,
On 2024/10/21 21:08, Neil Armstrong wrote:
Hi,
On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote:
The assignment of the of_node to the aux bridge needs to mark the
of_node as reused as well
On 2024/11/1 00:23, Johan Hovold wrote:
On Thu, Oct 31, 2024 at 11:06:38PM +0800, Sui Jingfeng wrote:
But I think Johan do need more times to understand what exactly
the real problem is. We do need times to investigate new method.
No, I know perfectly well what the (immediate) problem is
Hi, Dears maintainers
On 2024/10/31 20:31, Neil Armstrong wrote:
On 30/10/2024 15:49, Sui Jingfeng wrote:
Hi,
On 2024/10/21 21:08, Neil Armstrong wrote:
Hi,
On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote:
The assignment of the of_node to the aux bridge needs to mark the
of_node as
Print an error message to help debug when such an error happens,
since there meight have other CPU page size & GPU page size combinations.
Reviewed-by: Lucas Stach
Signed-off-by: Sui Jingfeng
---
v3:
- Pick up tags and resend.
- Slightly improve commit message.
---
drivers/gpu/drm/etn
Hi,
On 2024/10/31 22:02, Johan Hovold wrote:
On Thu, Oct 31, 2024 at 01:31:47PM +0100, Neil Armstrong wrote:
On 30/10/2024 15:49, Sui Jingfeng wrote:
On 2024/10/21 21:08, Neil Armstrong wrote:
On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote:
The assignment of the of_node to the aux
o_vmap() requires its callees return '-EINVAL' on invalid range,
similier for other users or call path. Let's meet the requirement.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/drm_prime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/
Hi,
On 2024/10/18 23:43, Dmitry Baryshkov wrote:
On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote:
The assignment of the of_node to the aux bridge needs to mark the
of_node as reused as well, otherwise resource providers like pinctrl will
report a gpio as already requested by a differe
Hi,
On 2024/10/21 21:08, Neil Armstrong wrote:
Hi,
On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote:
The assignment of the of_node to the aux bridge needs to mark the
of_node as reused as well, otherwise resource providers like pinctrl will
report a gpio as already requested by a different
Hi,
On 2024/10/29 00:05, Sui Jingfeng wrote:
The 'offset' data member of the 'struct scatterlist' denotes the offset
into a SG entry in bytes. The sg_dma_len() macro could be used to get
lengths of SG entries, those lengths are expected to be CPU page size
aligned. Since,
This shorten the length of code in horizential direction, therefore is
easier to read.
Signed-off-by: Sui Jingfeng
---
lib/scatterlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 473b2646f71c..5bb6b8aff232 100644
--- a
Hi, Dear reviewers
On 2024/10/29 00:05, Sui Jingfeng wrote:
The 'offset' data member of the 'struct scatterlist' denotes the offset
into a SG entry in bytes. The sg_dma_len() macro could be used to get
lengths of SG entries, those lengths are expected to be CPU page siz
Hi,
On 2024/10/29 00:01, Lucas Stach wrote:
Hi Sui,
Am Montag, dem 07.10.2024 um 12:20 +0200 schrieb Lucas Stach:
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng:
Print an error message to help debug when such an issue happen, since it's
not so obvious.
Signed-off-by
Avoid hint the compiler to do unnecessary integer promotion.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 1661
r unmapped.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 4ee9ed96b1d8..f6c997c459ca 100644
--- a/drivers/gpu/d
Hi,
On 10/7/24 18:12, Lucas Stach wrote:
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng:
Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU
page size is 16KiB. The size of etnaviv buffer objects will be aligned
to CPU page size on kernel side, however
Stach
Reviewed-by: Christian Gmeiner
Tested-by: Sui Jingfeng
Tested with on a 16 KiB system, it works fine as before.
I notices that most test samples of glmark2 consumes only one page,
only a few of them consumes more than one page command buffer, can
up to 20 KiB.
---
drivers/gpu/drm/et
Hi,
On 2024/10/7 18:17, Lucas Stach wrote:
@@ -104,21 +108,7 @@ static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova,
static void etnaviv_iommu_unmap(struct etnaviv_iommu_context *context, u32
iova,
struct sg_table *sgt, unsigned len)
-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 36 +--
1 file changed, 12 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 1661d589bf3e..a2cd64bd2dc0 100644
--- a/drivers/gpu
//lore.kernel.org/dri-devel/20240930221706.399139-1-sui.jingf...@linux.dev/
Sui Jingfeng (2):
drm/etnaviv: Record GPU visible size of GEM BO separately
drm/etnaviv: Map and unmap GPUVA range with respect to the GPUVA size
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 11
drivers/gpu/drm/etnaviv/etnaviv_g
separately, ensure no
GPUVA range wasting by aligning that size to GPU page size.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 11 +--
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 5 +
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm
The etnaviv_cmdbuf.c doesn't reference any functions or data members
defined in drm_mm.h, remove unneeded headers may reduce kernel compile
times.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gp
Because it is not get used, drop it.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.h
b/drivers/gpu/drm/etnaviv/etnaviv_mmu.h
index c01a147f0dfd..7f8ac0178547 100644
--- a/drivers/gpu
Hi,
On 2024/10/7 18:12, Lucas Stach wrote:
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng:
Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU
page size is 16KiB. The size of etnaviv buffer objects will be aligned
to CPU page size on kernel side, however
Hi,
On 2024/10/7 18:17, Lucas Stach wrote:
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng:
Since the GPU VA space is compact in terms of 4KiB unit, map and/or unmap
the area that doesn't belong to a context breaks the philosophy of PPAS.
That results in severe errors: GPU
ioremaps the BAR.
Signed-off-by: Philipp Stanner
Reviewed-by: Sui Jingfeng
---
drivers/gpu/drm/loongson/lsdc_drv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c
b/drivers/gpu/drm/loongson/lsdc_drv.c
index adc7344d2f80
Print an error message to help debug when such an issue happen, since it's
not so obvious.
Signed-off-by: Sui Jingfeng
---
v0 -> v1: Use dev_err_ratelimited() to prevent spamming the logs
v0 is at
https://lore.kernel.org/dri-devel/20240930221706.399139-1-sui.jingf...@linux.dev/
---
partially map and/or
unmap the tail physical page with respect to this 'user size'. Ensure
that GPU VA is fully mapped and/or unmapped.
Sui Jingfeng (3):
drm/etnaviv: Track GPU VA size separately
drm/etnaviv: Map and unmap the GPU VA range with respect to its user
size
drm/etna
user size,
instead of the original physical size of its backing memory.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 28 +--
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
b/drivers/gpu/drm/et
possible, track the size that
userspace/GPU think of it is.
Yes, we still need to overallocate to suit the CPU, but there is no need
to waste GPU VA space anymore.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 8 +---
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1
asier
to use, as it doesn't need direct reference to the struct drm_driver.
The third argument of aperture_remove_conflicting_devices() does not
get used, so we can actually pass a casual string.
Signed-off-by: Thomas Zimmermann
Cc: Sui Jingfeng
Acked-by: Sui Jingfeng
---
drive
Hi,
On 2024/10/1 16:27, Lucas Stach wrote:
Hi Sui,
Am Dienstag, dem 01.10.2024 um 06:17 +0800 schrieb Sui Jingfeng:
Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU
page size is 16 KiB. The size of etnaviv buffer objects will be aligned
to CPU page size on kernel side
Hi,
On 2024/10/1 22:39, Lucas Stach wrote:
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng:
The etnaviv_gem_obj_add() a common operation, the 'etnaviv_drm_private::
gem_list' is being used to record(track) all of the etnaviv GEM buffer
object created in this drive
Hi,
On 2024/10/1 22:21, Lucas Stach wrote:
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng:
Which is corresonding to the etnaviv_gem_obj_add()
While symmetry is nice,
Thanks a lot for understanding and review my patch.
it's still not really symmetric,
patch 0016
Hi,
On 2024/10/1 21:40, Lucas Stach wrote:
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng:
The etnaviv_gem_prime_vmap() function has no caller in the
etnaviv_gem_prime.c file, move it into etnaviv_gem.c file.
While at it, rename it as etnaviv_gem_object_vmap(), since
it is a
softpin(userspace managed per-process address spaces) fails.
Because kernel side BO takes up bigger address space than user space
assumes whenever the size of a BO is not CPU page size aligned.
Insert an error message to help debug when such an issue happen.
Signed-off-by: Sui Jingfeng
---
For
naviv: request pages from DMA32 zone when needed")
Suggested-by: Sui Jingfeng
Signed-off-by: Xiaolei Wang
---
change log
v1:
https://patchwork.kernel.org/project/dri-devel/patch/20240806104733.2018783-1-xiaolei.w...@windriver.com/
v2:
Modify the issue of not retaining GFP_USER in v1
ev' uniformly.
Tested-by: Christian Gmeiner
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 10 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 16
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_d
.
It also could lead to problems if mutex_destroy() gets extended, add
missing mutex_destroy() to eliminate potential concerns.
Reviewed-by: Christian Gmeiner
Signed-off-by: Sui Jingfeng
---
v2: Pick up tags and fix one more missing mutex_destroy()
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2
Currently, the etnaviv_gem_submit.c isn't call any runtime power management
functions. So drop this unused header, we can include it back when it
really get used though.
Reviewed-by: Christian Gmeiner
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 1 -
1
y: Christian Gmeiner
Signed-off-by: Sui Jingfeng
---
v2: Pick up tags and improve commit message
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 5ffc31
Reviewed-by: Christian Gmeiner
Signed-off-by: Sui Jingfeng
---
v2: Pick up tags and improve commit message
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
b/drivers/gpu/drm/etn
.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/Makefile | 1 +
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12 +
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 11 +
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 5 +
drivers/gpu/drm/etnaviv/etnaviv_gem_vram.c | 258
Passed: 8294400 bytes
Test Write to SHMEM 8294400 bytes
Write to SHMEM Passed: 8294400 bytes
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/Makefile | 1 +
drivers/gpu/drm/etnaviv/etnaviv_debugfs.c | 118 +
drivers/gpu/drm/etnaviv/etnaviv_debugfs.h | 15
Otherwise we don't know where a etnaviv GEM buffer object should put when
we create it at userspace.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 9 +
include/uapi/drm/etnaviv_drm.h| 12
2 files changed, 21 insertions(+)
diff --
now,
since the ernaviv_gem_new_private() has been unified. Make the
etnaviv_gem_obj_add() static is a next nature thing.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 8 +++-
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 -
drivers/gpu/drm/etnaviv/etnaviv_gem_pr
Because some PCIe IP need special setup before its VRAM bar can be usable,
do this with instance specific object function.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/Makefile | 3 +-
drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 19
drivers/gpu/drm/etnaviv
r handling anymore.
if true, the drm_gem_object_init() will allocate backing storage for us,
then this is a shmem buffer object. if false, we have to implement driver
specific backing storage.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 28 +
drive
.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/Kconfig | 9 ++
drivers/gpu/drm/etnaviv/Makefile | 2 +
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 45 +-
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 11 ++
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 73
uture if it
not reflect the hardware perfectly.
Expose it via etnaviv parameter mechanism to let userspace know.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +++
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 9 +
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4
i
Which is corresonding to the etnaviv_gem_obj_add()
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index
containing structure.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.c| 65
drivers/gpu/drm/etnaviv/etnaviv_drv.h| 7 +++
drivers/gpu/drm/etnaviv/etnaviv_gem.c| 4 +-
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +-
drivers/gpu/d
dedicated helpers introduced, etnaviv_bind() and
etnaviv_unbind() gets simplified. Another potential benefit is that
we could put the struct drm_device into struct etnaviv_drm_private
in the future, which made them share the same life time.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etn
rying to vmap a
DMABUF")
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 1fd2cff20ef4..b899aea64
code blocks,
which make it easier to call this function on the platform where it works.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 53 ---
1 file changed, 32 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
b/dr
drm_WARN_ON() acts like WARN_ON(), but with the key difference of
using device specific information so that we know from which device
the warning is originating from.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 9 +
drivers/gpu/drm/etnaviv
Because this make the code more easier to understand, When GPU access the
VRAM, it will allocate a new mapping to use if there don't have one.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 40 +++
drivers/gpu/drm/etnaviv/etnaviv_gem.h
has
etnaviv_gem_prime_vmap_impl() as the implementation to vmap
a imported GEM buffer object.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 -
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 +++-
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 12
. As then, the etnaviv_gem_xxx_release()
only need to responsible for the release page works.
The etnaviv_gem_vunmap() is added for driver internal usa case, where no
DRM GEM framework is involved.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 +
drivers/gpu/drm
This will make the newly implemented etnaviv_gem_object_funcs::print_info
get in use, which improves code sharing and simplifies debugfs. Achieve
better humen readability for debug log.
Use container_of_const() if 'struct etnaviv_gem_object *etnaviv_obj' is a
constant pointer.
Signed-o
It will be called by drm_gem_print_info() if implemented, and it can
provide more information about the framebuffer objects.
Signed-off-by: Sui Jingfeng
---
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 32 +++
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 +-
2 files changed, 33
card. Select the PCIe device as parent, generate a
virtual platform device as component master to take over the bind actions.
Sui Jingfeng (19):
drm/etnaviv: Implement drm_gem_object_funcs::print_info()
drm/etnaviv: Export drm_gem_print_info() and use it
drm/etnaviv: Implement
ernel."
However, drm/etnaviv will use the pages to implement vmap and mmap
operations of the GEM object function. The flag still set at present.
When we can't get pages, it certainly is a bug. Hence, we should print
this kind of error with drm_err() instead of dev_dbg().
Signed-off-b
Hi, Xiaolei
Thanks for your nice catch! I have more to say.
On 2024/8/16 09:55, Wang, Xiaolei wrote:
Ping ...
32 address -> 32-bit address,
Perhaps, we could improve the commit title a little bit
by writing a more accurate sentence if possible, say:
drm/etnaviv: Properly request pages from
On 2024/8/31 03:40, Sui Jingfeng wrote:
Hi, Xiaolei
On 2024/8/16 09:55, Wang, Xiaolei wrote:
Ping ...
I think, the more proper fix that Lucas hint
is to modify the 'priv->shm_gfp_mask' variable
in the|etnaviv_bind() function|. Say:
|Use "priv->shm_gfp_mask = GFP_USER
Hi, Xiaolei
On 2024/8/16 09:55, Wang, Xiaolei wrote:
Ping ...
I think, the more proper fix that Lucas hint
is to modify the 'priv->shm_gfp_mask' variable
in the|etnaviv_bind() function|. Say:
|Use "priv->shm_gfp_mask = GFP_USER | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;"|
instead of
|"priv->shm_
1 - 100 of 1172 matches
Mail list logo