Skip to contentSkip to conversation

drm/lima: driver for ARM Mali4xx GPUs

PATCH In review Qiang Yu 9 participants 25 messages Mar 9, 2019 – Apr 3, 2019

Subsystems (3)
lore
Share & tools
lore

Qiang Yu

author maintainer
#0 lore raw

PATCH v8 1/1 drm/lima: driver for ARM Mali4xx GPUs

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---
 drivers/gpu/drm/Kconfig               |   2 +
 drivers/gpu/drm/Makefile              |   1 +
 drivers/gpu/drm/lima/Kconfig          |  10 +
 drivers/gpu/drm/lima/Makefile         |  21 ++
 drivers/gpu/drm/lima/lima_bcast.c     |  47 +++
 drivers/gpu/drm/lima/lima_bcast.h     |  14 +
 drivers/gpu/drm/lima/lima_ctx.c       |  98 ++++++
 drivers/gpu/drm/lima/lima_ctx.h       |  30 ++
 drivers/gpu/drm/lima/lima_device.c    | 385 +++++++++++++++++++++++
 drivers/gpu/drm/lima/lima_device.h    | 131 ++++++++
 drivers/gpu/drm/lima/lima_dlbu.c      |  58 ++++
 drivers/gpu/drm/lima/lima_dlbu.h      |  18 ++
 drivers/gpu/drm/lima/lima_drv.c       | 376 +++++++++++++++++++++++
 drivers/gpu/drm/lima/lima_drv.h       |  45 +++
 drivers/gpu/drm/lima/lima_gem.c       | 381 +++++++++++++++++++++++
 drivers/gpu/drm/lima/lima_gem.h       |  25 ++
 drivers/gpu/drm/lima/lima_gem_prime.c |  47 +++
 drivers/gpu/drm/lima/lima_gem_prime.h |  13 +
 drivers/gpu/drm/lima/lima_gp.c        | 283 +++++++++++++++++
 drivers/gpu/drm/lima/lima_gp.h        |  16 +
 drivers/gpu/drm/lima/lima_l2_cache.c  |  80 +++++
 drivers/gpu/drm/lima/lima_l2_cache.h  |  14 +
 drivers/gpu/drm/lima/lima_mmu.c       | 142 +++++++++
 drivers/gpu/drm/lima/lima_mmu.h       |  16 +
 drivers/gpu/drm/lima/lima_object.c    | 122 ++++++++
 drivers/gpu/drm/lima/lima_object.h    |  36 +++
 drivers/gpu/drm/lima/lima_pmu.c       |  60 ++++
 drivers/gpu/drm/lima/lima_pmu.h       |  12 +
 drivers/gpu/drm/lima/lima_pp.c        | 427 ++++++++++++++++++++++++++
 drivers/gpu/drm/lima/lima_pp.h        |  19 ++
 drivers/gpu/drm/lima/lima_regs.h      | 298 ++++++++++++++++++
 drivers/gpu/drm/lima/lima_sched.c     | 404 ++++++++++++++++++++++++
 drivers/gpu/drm/lima/lima_sched.h     | 104 +++++++
 drivers/gpu/drm/lima/lima_vm.c        | 282 +++++++++++++++++
 drivers/gpu/drm/lima/lima_vm.h        |  62 ++++
 include/uapi/drm/lima_drm.h           | 169 ++++++++++
 36 files changed, 4248 insertions(+)
 create mode 100644 drivers/gpu/drm/lima/Kconfig
 create mode 100644 drivers/gpu/drm/lima/Makefile
 create mode 100644 drivers/gpu/drm/lima/lima_bcast.c
 create mode 100644 drivers/gpu/drm/lima/lima_bcast.h
 create mode 100644 drivers/gpu/drm/lima/lima_ctx.c
 create mode 100644 drivers/gpu/drm/lima/lima_ctx.h
 create mode 100644 drivers/gpu/drm/lima/lima_device.c
 create mode 100644 drivers/gpu/drm/lima/lima_device.h
 create mode 100644 drivers/gpu/drm/lima/lima_dlbu.c
 create mode 100644 drivers/gpu/drm/lima/lima_dlbu.h
 create mode 100644 drivers/gpu/drm/lima/lima_drv.c
 create mode 100644 drivers/gpu/drm/lima/lima_drv.h
 create mode 100644 drivers/gpu/drm/lima/lima_gem.c
 create mode 100644 drivers/gpu/drm/lima/lima_gem.h
 create mode 100644 drivers/gpu/drm/lima/lima_gem_prime.c
 create mode 100644 drivers/gpu/drm/lima/lima_gem_prime.h
 create mode 100644 drivers/gpu/drm/lima/lima_gp.c
 create mode 100644 drivers/gpu/drm/lima/lima_gp.h
 create mode 100644 drivers/gpu/drm/lima/lima_l2_cache.c
 create mode 100644 drivers/gpu/drm/lima/lima_l2_cache.h
 create mode 100644 drivers/gpu/drm/lima/lima_mmu.c
 create mode 100644 drivers/gpu/drm/lima/lima_mmu.h
 create mode 100644 drivers/gpu/drm/lima/lima_object.c
 create mode 100644 drivers/gpu/drm/lima/lima_object.h
 create mode 100644 drivers/gpu/drm/lima/lima_pmu.c
 create mode 100644 drivers/gpu/drm/lima/lima_pmu.h
 create mode 100644 drivers/gpu/drm/lima/lima_pp.c
 create mode 100644 drivers/gpu/drm/lima/lima_pp.h
 create mode 100644 drivers/gpu/drm/lima/lima_regs.h
 create mode 100644 drivers/gpu/drm/lima/lima_sched.c
 create mode 100644 drivers/gpu/drm/lima/lima_sched.h
 create mode 100644 drivers/gpu/drm/lima/lima_vm.c
 create mode 100644 drivers/gpu/drm/lima/lima_vm.h
 create mode 100644 include/uapi/drm/lima_drm.h
drivers/gpu/drm/Kconfig +2 -0
index bd943a71756c..1716e420baf9 100644
@@ -329,6 +329,8 @@ source "drivers/gpu/drm/tve200/Kconfig"
 
 source "drivers/gpu/drm/xen/Kconfig"
 
+source "drivers/gpu/drm/lima/Kconfig"
+
 # Keep legacy drivers last
 
 menuconfig DRM_LEGACY
drivers/gpu/drm/Makefile +1 -0
index 1ac55c65eac0..1f9d0076f99a 100644
@@ -109,3 +109,4 @@ obj-$(CONFIG_DRM_TINYDRM) += tinydrm/
 obj-$(CONFIG_DRM_PL111) += pl111/
 obj-$(CONFIG_DRM_TVE200) += tve200/
 obj-$(CONFIG_DRM_XEN) += xen/
+obj-$(CONFIG_DRM_LIMA)  += lima/
drivers/gpu/drm/lima/Kconfig new file +10 -0
new file mode 100644
index 000000000000..f11314448093
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0 OR MIT
+# Copyright 2017-2019 Qiang Yu <[email protected]>
+
+config DRM_LIMA
+       tristate "LIMA (DRM support for ARM Mali 400/450 GPU)"
+       depends on DRM
+       depends on ARM || ARM64 || COMPILE_TEST
+       select DRM_SCHED
+       help
+         DRM driver for ARM Mali 400/450 GPUs.
drivers/gpu/drm/lima/Makefile new file +21 -0
new file mode 100644
index 000000000000..38cc70281ba5
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0 OR MIT
+# Copyright 2017-2019 Qiang Yu <[email protected]>
+
+lima-y := \
+	lima_drv.o \
+	lima_device.o \
+	lima_pmu.o \
+	lima_l2_cache.o \
+	lima_mmu.o \
+	lima_gp.o \
+	lima_pp.o \
+	lima_gem.o \
+	lima_vm.o \
+	lima_sched.o \
+	lima_ctx.o \
+	lima_gem_prime.o \
+	lima_dlbu.o \
+	lima_bcast.o \
+	lima_object.o
+
+obj-$(CONFIG_DRM_LIMA) += lima.o
drivers/gpu/drm/lima/lima_bcast.c new file +47 -0

47 lines not on this page · raw message

drivers/gpu/drm/lima/lima_bcast.h new file +14 -0
new file mode 100644
index 000000000000..c47e58563d0a
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2018-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_BCAST_H__
+#define __LIMA_BCAST_H__
+
+struct lima_ip;
+
+int lima_bcast_init(struct lima_ip *ip);
+void lima_bcast_fini(struct lima_ip *ip);
+
+void lima_bcast_enable(struct lima_device *dev, int num_pp);
+
+#endif
drivers/gpu/drm/lima/lima_ctx.c new file +98 -0

98 lines not on this page · raw message

drivers/gpu/drm/lima/lima_ctx.h new file +30 -0
new file mode 100644
index 000000000000..6154e5c9bfe4
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2018-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_CTX_H__
+#define __LIMA_CTX_H__
+
+#include <linux/xarray.h>
+
+#include "lima_device.h"
+
+struct lima_ctx {
+	struct kref refcnt;
+	struct lima_device *dev;
+	struct lima_sched_context context[lima_pipe_num];
+	atomic_t guilty;
+};
+
+struct lima_ctx_mgr {
+	struct mutex lock;
+	struct xarray handles;
+};
+
+int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id);
+int lima_ctx_free(struct lima_ctx_mgr *mgr, u32 id);
+struct lima_ctx *lima_ctx_get(struct lima_ctx_mgr *mgr, u32 id);
+void lima_ctx_put(struct lima_ctx *ctx);
+void lima_ctx_mgr_init(struct lima_ctx_mgr *mgr);
+void lima_ctx_mgr_fini(struct lima_ctx_mgr *mgr);
+
+#endif
drivers/gpu/drm/lima/lima_device.c new file +385 -0

385 lines not on this page · raw message

drivers/gpu/drm/lima/lima_device.h new file +131 -0

131 lines not on this page · raw message

drivers/gpu/drm/lima/lima_dlbu.c new file +58 -0

58 lines not on this page · raw message

drivers/gpu/drm/lima/lima_dlbu.h new file +18 -0
new file mode 100644
index 000000000000..16f877984466
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2018-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_DLBU_H__
+#define __LIMA_DLBU_H__
+
+struct lima_ip;
+struct lima_device;
+
+void lima_dlbu_enable(struct lima_device *dev, int num_pp);
+void lima_dlbu_disable(struct lima_device *dev);
+
+void lima_dlbu_set_reg(struct lima_ip *ip, u32 *reg);
+
+int lima_dlbu_init(struct lima_ip *ip);
+void lima_dlbu_fini(struct lima_ip *ip);
+
+#endif
drivers/gpu/drm/lima/lima_drv.c new file +376 -0

376 lines not on this page · raw message

drivers/gpu/drm/lima/lima_drv.h new file +45 -0

45 lines not on this page · raw message

drivers/gpu/drm/lima/lima_gem.c new file +381 -0

381 lines not on this page · raw message

drivers/gpu/drm/lima/lima_gem.h new file +25 -0
new file mode 100644
index 000000000000..556111a01135
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_GEM_H__
+#define __LIMA_GEM_H__
+
+struct lima_bo;
+struct lima_submit;
+
+extern const struct vm_operations_struct lima_gem_vm_ops;
+
+struct lima_bo *lima_gem_create_bo(struct drm_device *dev, u32 size, u32 flags);
+int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file,
+			   u32 size, u32 flags, u32 *handle);
+void lima_gem_free_object(struct drm_gem_object *obj);
+int lima_gem_object_open(struct drm_gem_object *obj, struct drm_file *file);
+void lima_gem_object_close(struct drm_gem_object *obj, struct drm_file *file);
+int lima_gem_get_info(struct drm_file *file, u32 handle, u32 *va, u64 *offset);
+int lima_gem_mmap(struct file *filp, struct vm_area_struct *vma);
+int lima_gem_submit(struct drm_file *file, struct lima_submit *submit);
+int lima_gem_wait(struct drm_file *file, u32 handle, u32 op, s64 timeout_ns);
+
+void lima_set_vma_flags(struct vm_area_struct *vma);
+
+#endif
drivers/gpu/drm/lima/lima_gem_prime.c new file +47 -0

47 lines not on this page · raw message

drivers/gpu/drm/lima/lima_gem_prime.h new file +13 -0
new file mode 100644
index 000000000000..34b4d35c21e3
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2018-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_GEM_PRIME_H__
+#define __LIMA_GEM_PRIME_H__
+
+struct drm_gem_object *lima_gem_prime_import_sg_table(
+	struct drm_device *dev, struct dma_buf_attachment *attach,
+	struct sg_table *sgt);
+struct sg_table *lima_gem_prime_get_sg_table(struct drm_gem_object *obj);
+int lima_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
+
+#endif
drivers/gpu/drm/lima/lima_gp.c new file +283 -0

283 lines not on this page · raw message

drivers/gpu/drm/lima/lima_gp.h new file +16 -0
new file mode 100644
index 000000000000..516e5c1babbb
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_GP_H__
+#define __LIMA_GP_H__
+
+struct lima_ip;
+struct lima_device;
+
+int lima_gp_init(struct lima_ip *ip);
+void lima_gp_fini(struct lima_ip *ip);
+
+int lima_gp_pipe_init(struct lima_device *dev);
+void lima_gp_pipe_fini(struct lima_device *dev);
+
+#endif
drivers/gpu/drm/lima/lima_l2_cache.c new file +80 -0

80 lines not on this page · raw message

drivers/gpu/drm/lima/lima_l2_cache.h new file +14 -0
new file mode 100644
index 000000000000..c63fb676ff14
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_L2_CACHE_H__
+#define __LIMA_L2_CACHE_H__
+
+struct lima_ip;
+
+int lima_l2_cache_init(struct lima_ip *ip);
+void lima_l2_cache_fini(struct lima_ip *ip);
+
+int lima_l2_cache_flush(struct lima_ip *ip);
+
+#endif
drivers/gpu/drm/lima/lima_mmu.c new file +142 -0

142 lines not on this page · raw message

drivers/gpu/drm/lima/lima_mmu.h new file +16 -0
new file mode 100644
index 000000000000..8c78319bcc8e
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_MMU_H__
+#define __LIMA_MMU_H__
+
+struct lima_ip;
+struct lima_vm;
+
+int lima_mmu_init(struct lima_ip *ip);
+void lima_mmu_fini(struct lima_ip *ip);
+
+void lima_mmu_switch_vm(struct lima_ip *ip, struct lima_vm *vm);
+void lima_mmu_page_fault_resume(struct lima_ip *ip);
+
+#endif
drivers/gpu/drm/lima/lima_object.c new file +122 -0

122 lines not on this page · raw message

drivers/gpu/drm/lima/lima_object.h new file +36 -0
new file mode 100644
index 000000000000..6738724afb7b
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2018-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_OBJECT_H__
+#define __LIMA_OBJECT_H__
+
+#include <drm/drm_gem.h>
+
+#include "lima_device.h"
+
+struct lima_bo {
+	struct drm_gem_object gem;
+
+	struct page **pages;
+	dma_addr_t *pages_dma_addr;
+	struct sg_table *sgt;
+	void *vaddr;
+
+	struct mutex lock;
+	struct list_head va;
+};
+
+static inline struct lima_bo *
+to_lima_bo(struct drm_gem_object *obj)
+{
+	return container_of(obj, struct lima_bo, gem);
+}
+
+struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
+			       u32 flags, struct sg_table *sgt,
+			       struct reservation_object *resv);
+void lima_bo_destroy(struct lima_bo *bo);
+void *lima_bo_vmap(struct lima_bo *bo);
+void lima_bo_vunmap(struct lima_bo *bo);
+
+#endif
drivers/gpu/drm/lima/lima_pmu.c new file +60 -0

60 lines not on this page · raw message

drivers/gpu/drm/lima/lima_pmu.h new file +12 -0
new file mode 100644
index 000000000000..a2a18775eb07
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_PMU_H__
+#define __LIMA_PMU_H__
+
+struct lima_ip;
+
+int lima_pmu_init(struct lima_ip *ip);
+void lima_pmu_fini(struct lima_ip *ip);
+
+#endif
drivers/gpu/drm/lima/lima_pp.c new file +427 -0

427 lines not on this page · raw message

drivers/gpu/drm/lima/lima_pp.h new file +19 -0
new file mode 100644
index 000000000000..bf60c77b2633
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 OR MIT */
+/* Copyright 2017-2019 Qiang Yu <[email protected]> */
+
+#ifndef __LIMA_PP_H__
+#define __LIMA_PP_H__
+
+struct lima_ip;
+struct lima_device;
+
+int lima_pp_init(struct lima_ip *ip);
+void lima_pp_fini(struct lima_ip *ip);
+
+int lima_pp_bcast_init(struct lima_ip *ip);
+void lima_pp_bcast_fini(struct lima_ip *ip);
+
+int lima_pp_pipe_init(struct lima_device *dev);
+void lima_pp_pipe_fini(struct lima_device *dev);
+
+#endif
drivers/gpu/drm/lima/lima_regs.h new file +298 -0

62 lines not on this page · raw message

drivers/gpu/drm/lima/lima_sched.c new file +404 -0

404 lines not on this page · raw message

drivers/gpu/drm/lima/lima_sched.h new file +104 -0

104 lines not on this page · raw message

drivers/gpu/drm/lima/lima_vm.c new file +282 -0

282 lines not on this page · raw message

drivers/gpu/drm/lima/lima_vm.h new file +62 -0

62 lines not on this page · raw message

include/uapi/drm/lima_drm.h new file +169 -0

169 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Part of the diff is not shown here. View the raw message.

#1 lore raw
Thank you for the patch! Yet something to improve:

Hi Qiang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0 next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Qiang-Yu/drm-lima-driver-for-ARM-Mali4xx-GPUs/20190310-073206
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=ia64

All errors (new ones prefixed by >>):

In file included from drivers/gpu/drm/lima/lima_object.c:8:
drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration

              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c:37:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create_struct':
>> drivers/gpu/drm/lima/lima_object.c:50:10: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
     bo->gem.resv = resv;
             ^~~~
             dev
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:63:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_object.c:61:17: error: conflicting types for 'lima_bo_create'
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:29:17: note: previous declaration of 'lima_bo_create' was here
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create':
>> drivers/gpu/drm/lima/lima_object.c:69:47: error: passing argument 4 of 'lima_bo_create_struct' from incompatible pointer type [-Werror=incompatible-pointer-types]
     bo = lima_bo_create_struct(dev, size, flags, resv);
                                                  ^~~~

drivers/gpu/drm/lima/lima_object.c:37:38: note: expected 'struct reservation_object *' but argument is of type 'struct reservation_object *'
struct reservation_object *resv)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/lima/lima_gem.c:17:
drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration

              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_sync_bo':
>> drivers/gpu/drm/lima/lima_gem.c:138:9: error: implicit declaration of function 'reservation_object_reserve_shared' [-Werror=implicit-function-declaration]
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/lima/lima_gem.c:138:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
                                                      ^~~~
                                                      dev
>> drivers/gpu/drm/lima/lima_gem.c:153:9: error: implicit declaration of function 'reservation_object_get_fences_rcu' [-Werror=implicit-function-declaration]
      err = reservation_object_get_fences_rcu(
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:154:12: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       bo->gem.resv, NULL, &nr_fences, &fences);
               ^~~~
               dev
>> drivers/gpu/drm/lima/lima_gem.c:168:3: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
      kfree(fences);
      ^~~~~
      kvfree
>> drivers/gpu/drm/lima/lima_gem.c:172:11: error: implicit declaration of function 'reservation_object_get_excl_rcu' [-Werror=implicit-function-declaration]
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:172:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_lock_bos':
   drivers/gpu/drm/lima/lima_gem.c:188:24: error: 'reservation_ww_class' undeclared (first use in this function)
     ww_acquire_init(ctx, &reservation_ww_class);
                           ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:188:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/lima/lima_gem.c:197:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:209:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c:212:42: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
                                             ^~~~
                                             dev
   drivers/gpu/drm/lima/lima_gem.c:217:25: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       &bos[contended]->gem.resv->lock, ctx);
                            ^~~~
                            dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_unlock_bos':
   drivers/gpu/drm/lima/lima_gem.c:234:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_submit':
>> drivers/gpu/drm/lima/lima_gem.c:331:4: error: implicit declaration of function 'reservation_object_add_excl_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:331:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
                                                     ^~~~
                                                     dev
>> drivers/gpu/drm/lima/lima_gem.c:333:4: error: implicit declaration of function 'reservation_object_add_shared_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:333:52: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
                                                       ^~~~
                                                       dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_wait':
>> drivers/gpu/drm/lima/lima_gem.c:374:12: error: implicit declaration of function 'drm_timeout_abs_to_jiffies'; did you mean 'timeval_to_jiffies'? [-Werror=implicit-function-declaration]
     timeout = drm_timeout_abs_to_jiffies(timeout_ns);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               timeval_to_jiffies
>> drivers/gpu/drm/lima/lima_gem.c:376:8: error: implicit declaration of function 'drm_gem_reservation_object_wait'; did you mean 'drm_gem_private_object_init'? [-Werror=implicit-function-declaration]
     ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           drm_gem_private_object_init

cc1: some warnings being treated as errors

vim +50 drivers/gpu/drm/lima/lima_object.c

     7	
   > 8	#include "lima_object.h"
     9	
    10	void lima_bo_destroy(struct lima_bo *bo)
    11	{
    12		if (bo->sgt) {
    13			kfree(bo->pages);
    14			drm_prime_gem_destroy(&bo->gem, bo->sgt);
    15		} else {
    16			if (bo->pages_dma_addr) {
    17				int i, npages = bo->gem.size >> PAGE_SHIFT;
    18	
    19				for (i = 0; i < npages; i++) {
    20					if (bo->pages_dma_addr[i])
    21						dma_unmap_page(bo->gem.dev->dev,
    22							       bo->pages_dma_addr[i],
    23							       PAGE_SIZE, DMA_BIDIRECTIONAL);
    24				}
    25			}
    26	
    27			if (bo->pages)
    28				drm_gem_put_pages(&bo->gem, bo->pages, true, true);
    29		}
    30	
    31		kfree(bo->pages_dma_addr);
    32		drm_gem_object_release(&bo->gem);
    33		kfree(bo);
    34	}
    35	
    36	static struct lima_bo *lima_bo_create_struct(struct lima_device *dev, u32 size, u32 flags,
    37						     struct reservation_object *resv)
    38	{
    39		struct lima_bo *bo;
    40		int err;
    41	
    42		size = PAGE_ALIGN(size);
    43	
    44		bo = kzalloc(sizeof(*bo), GFP_KERNEL);
    45		if (!bo)
    46			return ERR_PTR(-ENOMEM);
    47	
    48		mutex_init(&bo->lock);
    49		INIT_LIST_HEAD(&bo->va);
  > 50		bo->gem.resv = resv;
    51	
    52		err = drm_gem_object_init(dev->ddev, &bo->gem, size);
    53		if (err) {
    54			kfree(bo);
    55			return ERR_PTR(err);
    56		}
    57	
    58		return bo;
    59	}
    60	
  > 61	struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
    62				       u32 flags, struct sg_table *sgt,
    63				       struct reservation_object *resv)
    64	{
    65		int i, err;
    66		size_t npages;
    67		struct lima_bo *bo, *ret;
    68	
  > 69		bo = lima_bo_create_struct(dev, size, flags, resv);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Qiang Yu
Thank you for the patch! Yet something to improve:

Hi Qiang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0 next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Qiang-Yu/drm-lima-driver-for-ARM-Mali4xx-GPUs/20190310-073206
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=arm

All errors (new ones prefixed by >>):

In file included from drivers/gpu/drm/lima/lima_gem.c:17:
drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration

              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_sync_bo':
   drivers/gpu/drm/lima/lima_gem.c:138:9: error: implicit declaration of function 'reservation_object_reserve_shared' [-Werror=implicit-function-declaration]
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:138:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c:153:9: error: implicit declaration of function 'reservation_object_get_fences_rcu' [-Werror=implicit-function-declaration]
      err = reservation_object_get_fences_rcu(
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:154:12: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       bo->gem.resv, NULL, &nr_fences, &fences);
               ^~~~
               dev
>> drivers/gpu/drm/lima/lima_gem.c:168:3: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
      kfree(fences);
      ^~~~~
      vfree
   drivers/gpu/drm/lima/lima_gem.c:172:11: error: implicit declaration of function 'reservation_object_get_excl_rcu' [-Werror=implicit-function-declaration]
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:172:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_lock_bos':
   drivers/gpu/drm/lima/lima_gem.c:188:24: error: 'reservation_ww_class' undeclared (first use in this function)
     ww_acquire_init(ctx, &reservation_ww_class);
                           ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:188:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/lima/lima_gem.c:197:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:209:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c:212:42: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
                                             ^~~~
                                             dev
   drivers/gpu/drm/lima/lima_gem.c:217:25: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       &bos[contended]->gem.resv->lock, ctx);
                            ^~~~
                            dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_unlock_bos':
   drivers/gpu/drm/lima/lima_gem.c:234:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_submit':
   drivers/gpu/drm/lima/lima_gem.c:331:4: error: implicit declaration of function 'reservation_object_add_excl_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:331:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:333:4: error: implicit declaration of function 'reservation_object_add_shared_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:333:52: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
                                                       ^~~~
                                                       dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_wait':
   drivers/gpu/drm/lima/lima_gem.c:374:12: error: implicit declaration of function 'drm_timeout_abs_to_jiffies'; did you mean 'timeval_to_jiffies'? [-Werror=implicit-function-declaration]
     timeout = drm_timeout_abs_to_jiffies(timeout_ns);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               timeval_to_jiffies
   drivers/gpu/drm/lima/lima_gem.c:376:8: error: implicit declaration of function 'drm_gem_reservation_object_wait'; did you mean 'drm_gem_private_object_init'? [-Werror=implicit-function-declaration]
     ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           drm_gem_private_object_init

cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/lima/lima_object.c:8:
drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration

              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_destroy':
   drivers/gpu/drm/lima/lima_object.c:13:3: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
      kfree(bo->pages);
      ^~~~~
      vfree
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:37:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create_struct':
   drivers/gpu/drm/lima/lima_object.c:44:7: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
     bo = kzalloc(sizeof(*bo), GFP_KERNEL);
          ^~~~~~~
          vzalloc
   drivers/gpu/drm/lima/lima_object.c:44:5: warning: assignment to 'struct lima_bo *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     bo = kzalloc(sizeof(*bo), GFP_KERNEL);
        ^
   drivers/gpu/drm/lima/lima_object.c:50:10: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
     bo->gem.resv = resv;
             ^~~~
             dev
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:63:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c:61:17: error: conflicting types for 'lima_bo_create'
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:29:17: note: previous declaration of 'lima_bo_create' was here
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create':
   drivers/gpu/drm/lima/lima_object.c:69:47: error: passing argument 4 of 'lima_bo_create_struct' from incompatible pointer type [-Werror=incompatible-pointer-types]
     bo = lima_bo_create_struct(dev, size, flags, resv);
                                                  ^~~~
   drivers/gpu/drm/lima/lima_object.c:37:38: note: expected 'struct reservation_object *' but argument is of type 'struct reservation_object *'
              struct reservation_object *resv)
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/gpu/drm/lima/lima_object.c:75:23: error: implicit declaration of function 'kcalloc'; did you mean 'kvcalloc'? [-Werror=implicit-function-declaration]
     bo->pages_dma_addr = kcalloc(npages, sizeof(dma_addr_t), GFP_KERNEL);
                          ^~~~~~~
                          kvcalloc
   drivers/gpu/drm/lima/lima_object.c:75:21: warning: assignment to 'dma_addr_t *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
     bo->pages_dma_addr = kcalloc(npages, sizeof(dma_addr_t), GFP_KERNEL);
                        ^
   drivers/gpu/drm/lima/lima_object.c:84:13: warning: assignment to 'struct page **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      bo->pages = kcalloc(npages, sizeof(*bo->pages), GFP_KERNEL);
                ^

cc1: some warnings being treated as errors

vim +168 drivers/gpu/drm/lima/lima_gem.c

131
132 static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,
133 bool write, bool explicit)
134 {
135 int err = 0;
136
137 if (!write) {
138 err = reservation_object_reserve_shared(bo->gem.resv, 1);
139 if (err)
140 return err;
141 }
142
143 /* explicit sync use user passed dep fence */
144 if (explicit)
145 return 0;
146
147 /* implicit sync use bo fence in resv obj */
148 if (write) {
149 unsigned nr_fences;
150 struct dma_fence **fences;
151 int i;
152

 > 153			err = reservation_object_get_fences_rcu(
   154				bo->gem.resv, NULL, &nr_fences, &fences);
   155			if (err || !nr_fences)
   156				return err;
   157	
   158			for (i = 0; i < nr_fences; i++) {
   159				err = lima_sched_task_add_dep(task, fences[i]);
   160				if (err)
   161					break;
   162			}
   163	
   164			/* for error case free remaining fences */
   165			for ( ; i < nr_fences; i++)
   166				dma_fence_put(fences[i]);
   167	
 > 168			kfree(fences);

169 } else {
170 struct dma_fence *fence;
171
172 fence = reservation_object_get_excl_rcu(bo->gem.resv);
173 if (fence) {
174 err = lima_sched_task_add_dep(task, fence);
175 if (err)
176 dma_fence_put(fence);
177 }
178 }
179
180 return err;
181 }
182

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#3 lore raw

Hi,

This patch should be applied to the drm-misc-next branch:
https://github.com/freedesktop/drm-misc/tree/drm-misc-next

Regards,
Qiang

Quoted 212 lines · kbuild test robot

Hi Qiang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0 next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Qiang-Yu/drm-lima-driver-for-ARM-Mali4xx-GPUs/20190310-073206
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=arm

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/lima/lima_gem.c:17:
   drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_sync_bo':
   drivers/gpu/drm/lima/lima_gem.c:138:9: error: implicit declaration of function 'reservation_object_reserve_shared' [-Werror=implicit-function-declaration]
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:138:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      err = reservation_object_reserve_shared(bo->gem.resv, 1);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c:153:9: error: implicit declaration of function 'reservation_object_get_fences_rcu' [-Werror=implicit-function-declaration]
      err = reservation_object_get_fences_rcu(
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:154:12: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       bo->gem.resv, NULL, &nr_fences, &fences);
               ^~~~
               dev
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/lima/lima_gem.c:168:3: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]

      kfree(fences);
      ^~~~~
      vfree
   drivers/gpu/drm/lima/lima_gem.c:172:11: error: implicit declaration of function 'reservation_object_get_excl_rcu' [-Werror=implicit-function-declaration]
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:172:51: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      fence = reservation_object_get_excl_rcu(bo->gem.resv);
                                                      ^~~~
                                                      dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_lock_bos':
   drivers/gpu/drm/lima/lima_gem.c:188:24: error: 'reservation_ww_class' undeclared (first use in this function)
     ww_acquire_init(ctx, &reservation_ww_class);
                           ^~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:188:24: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/lima/lima_gem.c:197:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:209:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c:212:42: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
                                             ^~~~
                                             dev
   drivers/gpu/drm/lima/lima_gem.c:217:25: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       &bos[contended]->gem.resv->lock, ctx);
                            ^~~~
                            dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_unlock_bos':
   drivers/gpu/drm/lima/lima_gem.c:234:32: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
      ww_mutex_unlock(&bos[i]->gem.resv->lock);
                                   ^~~~
                                   dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_submit':
   drivers/gpu/drm/lima/lima_gem.c:331:4: error: implicit declaration of function 'reservation_object_add_excl_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:331:50: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_excl_fence(bos[i]->gem.resv, fence);
                                                     ^~~~
                                                     dev
   drivers/gpu/drm/lima/lima_gem.c:333:4: error: implicit declaration of function 'reservation_object_add_shared_fence' [-Werror=implicit-function-declaration]
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_gem.c:333:52: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
       reservation_object_add_shared_fence(bos[i]->gem.resv, fence);
                                                       ^~~~
                                                       dev
   drivers/gpu/drm/lima/lima_gem.c: In function 'lima_gem_wait':
   drivers/gpu/drm/lima/lima_gem.c:374:12: error: implicit declaration of function 'drm_timeout_abs_to_jiffies'; did you mean 'timeval_to_jiffies'? [-Werror=implicit-function-declaration]
     timeout = drm_timeout_abs_to_jiffies(timeout_ns);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               timeval_to_jiffies
   drivers/gpu/drm/lima/lima_gem.c:376:8: error: implicit declaration of function 'drm_gem_reservation_object_wait'; did you mean 'drm_gem_private_object_init'? [-Werror=implicit-function-declaration]
     ret = drm_gem_reservation_object_wait(file, handle, write, timeout);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           drm_gem_private_object_init
   cc1: some warnings being treated as errors
--
   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:31:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv);
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_destroy':
   drivers/gpu/drm/lima/lima_object.c:13:3: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
      kfree(bo->pages);
      ^~~~~
      vfree
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:37:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create_struct':
   drivers/gpu/drm/lima/lima_object.c:44:7: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
     bo = kzalloc(sizeof(*bo), GFP_KERNEL);
          ^~~~~~~
          vzalloc
   drivers/gpu/drm/lima/lima_object.c:44:5: warning: assignment to 'struct lima_bo *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     bo = kzalloc(sizeof(*bo), GFP_KERNEL);
        ^
   drivers/gpu/drm/lima/lima_object.c:50:10: error: 'struct drm_gem_object' has no member named 'resv'; did you mean 'dev'?
     bo->gem.resv = resv;
             ^~~~
             dev
   drivers/gpu/drm/lima/lima_object.c: At top level:
   drivers/gpu/drm/lima/lima_object.c:63:18: warning: 'struct reservation_object' declared inside parameter list will not be visible outside of this definition or declaration
              struct reservation_object *resv)
                     ^~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c:61:17: error: conflicting types for 'lima_bo_create'
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/lima/lima_object.c:8:
   drivers/gpu/drm/lima/lima_object.h:29:17: note: previous declaration of 'lima_bo_create' was here
    struct lima_bo *lima_bo_create(struct lima_device *dev, u32 size,
                    ^~~~~~~~~~~~~~
   drivers/gpu/drm/lima/lima_object.c: In function 'lima_bo_create':
   drivers/gpu/drm/lima/lima_object.c:69:47: error: passing argument 4 of 'lima_bo_create_struct' from incompatible pointer type [-Werror=incompatible-pointer-types]
     bo = lima_bo_create_struct(dev, size, flags, resv);
                                                  ^~~~

drivers/gpu/drm/lima/lima_object.c:37:38: note: expected 'struct reservation_object *' but argument is of type 'struct reservation_object *'
struct reservation_object *resv)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/lima/lima_object.c:75:23: error: implicit declaration of function 'kcalloc'; did you mean 'kvcalloc'? [-Werror=implicit-function-declaration]

     bo->pages_dma_addr = kcalloc(npages, sizeof(dma_addr_t), GFP_KERNEL);
                          ^~~~~~~
                          kvcalloc
   drivers/gpu/drm/lima/lima_object.c:75:21: warning: assignment to 'dma_addr_t *' {aka 'unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
     bo->pages_dma_addr = kcalloc(npages, sizeof(dma_addr_t), GFP_KERNEL);
                        ^
   drivers/gpu/drm/lima/lima_object.c:84:13: warning: assignment to 'struct page **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      bo->pages = kcalloc(npages, sizeof(*bo->pages), GFP_KERNEL);
                ^

cc1: some warnings being treated as errors

vim +168 drivers/gpu/drm/lima/lima_gem.c

   131
   132  static int lima_gem_sync_bo(struct lima_sched_task *task, struct lima_bo *bo,
   133                              bool write, bool explicit)
   134  {
   135          int err = 0;
   136
   137          if (!write) {
   138                  err = reservation_object_reserve_shared(bo->gem.resv, 1);
   139                  if (err)
   140                          return err;
   141          }
   142
   143          /* explicit sync use user passed dep fence */
   144          if (explicit)
   145                  return 0;
   146
   147          /* implicit sync use bo fence in resv obj */
   148          if (write) {
   149                  unsigned nr_fences;
   150                  struct dma_fence **fences;
   151                  int i;
   152
Quoted 1 line

153 err = reservation_object_get_fences_rcu(

   154                          bo->gem.resv, NULL, &nr_fences, &fences);
   155                  if (err || !nr_fences)
   156                          return err;
   157
   158                  for (i = 0; i < nr_fences; i++) {
   159                          err = lima_sched_task_add_dep(task, fences[i]);
   160                          if (err)
   161                                  break;
   162                  }
   163
   164                  /* for error case free remaining fences */
   165                  for ( ; i < nr_fences; i++)
   166                          dma_fence_put(fences[i]);
   167
Quoted 1 line

168 kfree(fences);

   169          } else {
   170                  struct dma_fence *fence;
   171
   172                  fence = reservation_object_get_excl_rcu(bo->gem.resv);
   173                  if (fence) {
   174                          err = lima_sched_task_add_dep(task, fence);
   175                          if (err)
   176                                  dma_fence_put(fence);
   177                  }
   178          }
   179
   180          return err;
   181  }
   182
Quoted 3 lines

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to Qiang Yu
Quoted 96 lines · Qiang Yu

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---

[...]

Quoted 44 lines
drivers/gpu/drm/lima/lima_gem.c new file +44 -0
+static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,
+                            struct ww_acquire_ctx *ctx)
+{
+       int i, ret = 0, contended, slow_locked = -1;
+
+       ww_acquire_init(ctx, &reservation_ww_class);
+
+retry:
+       for (i = 0; i < nr_bos; i++) {
+               if (i == slow_locked) {
+                       slow_locked = -1;
+                       continue;
+               }
+
+               ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
+               if (ret < 0) {
+                       contended = i;
+                       goto err;
+               }
+       }
+
+       ww_acquire_done(ctx);
+       return 0;
+
+err:
+       for (i--; i >= 0; i--)
+               ww_mutex_unlock(&bos[i]->gem.resv->lock);
+
+       if (slow_locked >= 0)
+               ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
+
+       if (ret == -EDEADLK) {
+               /* we lost out in a seqno race, lock and retry.. */
+               ret = ww_mutex_lock_slow_interruptible(
+                       &bos[contended]->gem.resv->lock, ctx);
+               if (!ret) {
+                       slow_locked = contended;
+                       goto retry;
+               }
+       }
+       ww_acquire_fini(ctx);
+
+       return ret;
+}

drivers/gpu/drm/lima/lima_gem.c line 236

Quoted 10 lines
drivers/gpu/drm/lima/lima_gem.c new file +10 -0
+
+static void lima_gem_unlock_bos(struct lima_bo **bos, u32 nr_bos,
+                               struct ww_acquire_ctx *ctx)
+{
+       int i;
+
+       for (i = 0; i < nr_bos; i++)
+               ww_mutex_unlock(&bos[i]->gem.resv->lock);
+       ww_acquire_fini(ctx);
+}

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Rob

[1] https://patchwork.freedesktop.org/patch/291016/
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#5 lore raw
Quoted 99 lines · Rob Herring
Quoted 95 lines · Qiang Yu

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

Quoted 1 line

---

Quoted 1 line

[...]

I thought get your RB last time, should I remove it?

Quoted 51 lines
Quoted 51 lines
drivers/gpu/drm/lima/lima_gem.c new file +50 -0
+static int lima_gem_lock_bos(struct lima_bo **bos, u32 nr_bos,
+                            struct ww_acquire_ctx *ctx)
+{
+       int i, ret = 0, contended, slow_locked = -1;
+
+       ww_acquire_init(ctx, &reservation_ww_class);
+
+retry:
+       for (i = 0; i < nr_bos; i++) {
+               if (i == slow_locked) {
+                       slow_locked = -1;
+                       continue;
+               }
+
+               ret = ww_mutex_lock_interruptible(&bos[i]->gem.resv->lock, ctx);
+               if (ret < 0) {
+                       contended = i;
+                       goto err;
+               }
+       }
+
+       ww_acquire_done(ctx);
+       return 0;
+
+err:
+       for (i--; i >= 0; i--)
+               ww_mutex_unlock(&bos[i]->gem.resv->lock);
+
+       if (slow_locked >= 0)
+               ww_mutex_unlock(&bos[slow_locked]->gem.resv->lock);
+
+       if (ret == -EDEADLK) {
+               /* we lost out in a seqno race, lock and retry.. */
+               ret = ww_mutex_lock_slow_interruptible(
+                       &bos[contended]->gem.resv->lock, ctx);
+               if (!ret) {
+                       slow_locked = contended;
+                       goto retry;
+               }
+       }
+       ww_acquire_fini(ctx);
+
+       return ret;
+}
+
+static void lima_gem_unlock_bos(struct lima_bo **bos, u32 nr_bos,
+                               struct ww_acquire_ctx *ctx)
+{
+       int i;
+
Quoted 8 lines

drivers/gpu/drm/lima/lima_gem.c line 236

Quoted 4 lines
drivers/gpu/drm/lima/lima_gem.c new file +4 -0
+       for (i = 0; i < nr_bos; i++)
+               ww_mutex_unlock(&bos[i]->gem.resv->lock);
+       ww_acquire_fini(ctx);
+}

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Thanks for the remind.

Regards,
Qiang
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Hi,

Am Dienstag, 12. März 2019, 02:54:57 CET schrieb Qiang Yu:

Quoted 100 lines · Rob Herring
Quoted 99 lines · Qiang Yu
Quoted 96 lines

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---

Quoted 3 lines
Quoted 1 line

[...]

I thought get your RB last time, should I remove it?

I read Rob's comment as "if you need to resent for any other reason then you could modify for that patch, but no need to resend everything just for this", so a RB can probably stay as it is.

Heiko

Quoted 8 lines
Quoted 3 lines

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Thanks for the remind.

Regards,
Qiang

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

Hi,

So what's the status of it?

Has it been merged? I don't see it in drm-misc-next.

Regards,
Vasily

Quoted 106 lines · Heiko Stuebner

Hi,

Am Dienstag, 12. März 2019, 02:54:57 CET schrieb Qiang Yu:

Quoted 102 lines · Rob Herring
Quoted 100 lines · Qiang Yu
Quoted 96 lines

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---

[...]

Quoted 21 lines
Quoted 1 line

I thought get your RB last time, should I remove it?

I read Rob's comment as "if you need to resent for any other reason then you could modify for that patch, but no need to resend everything just for this", so a RB can probably stay as it is.

Heiko

Quoted 8 lines
Quoted 3 lines

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Thanks for the remind.

Regards,
Qiang

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

Neil

Quoted 134 lines

Has it been merged? I don't see it in drm-misc-next.

Regards,
Vasily

Quoted 127 lines · Heiko Stuebner

Hi,

Am Dienstag, 12. März 2019, 02:54:57 CET schrieb Qiang Yu:

Quoted 100 lines · Rob Herring
Quoted 99 lines · Qiang Yu
Quoted 96 lines

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---

Quoted 3 lines
Quoted 1 line

[...]

I thought get your RB last time, should I remove it?

I read Rob's comment as "if you need to resent for any other reason then you could modify for that patch, but no need to resend everything just for this", so a RB can probably stay as it is.

Heiko

Quoted 8 lines
Quoted 3 lines

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Thanks for the remind.

Regards,
Qiang

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

Hi Neil,

Quoted 9 lines · Neil Armstrong

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

Certainly that series is still waiting for Arm to come up with a patch (FWIW it is not forgotten, and several of us are still pushing it internally).

However, is having the tiled format definition a requirement for merging the rest of the driver? Isn't it more of an optimisation?

I would imagine (I don't know) that the GPU must be able to write out linear, otherwise I don't think its framebuffers could be scanned out by any display HW.

Thanks,
-Brian

Quoted 138 lines

Neil

Quoted 134 lines

Has it been merged? I don't see it in drm-misc-next.

Regards,
Vasily

Quoted 127 lines · Heiko Stuebner

Hi,

Am Dienstag, 12. März 2019, 02:54:57 CET schrieb Qiang Yu:

Quoted 100 lines · Rob Herring
Quoted 99 lines · Qiang Yu
Quoted 96 lines

- Mali 4xx GPUs have two kinds of processors GP and PP. GP is for OpenGL vertex shader processing and PP is for fragment shader processing. Each processor has its own MMU so prcessors work in virtual address space.
- There's only one GP but multiple PP (max 4 for mali 400 and 8 for mali 450) in the same mali 4xx GPU. All PPs are grouped togather to handle a single fragment shader task divided by FB output tiled pixels. Mali 400 user space driver is responsible for assign target tiled pixels to each PP, but mali 450 has a HW module called DLBU to dynamically balance each PP's load.
- User space driver allocate buffer object and map into GPU virtual address space, upload command stream and draw data with CPU mmap of the buffer object, then submit task to GP/PP with a register frame indicating where is the command stream and misc settings.
- There's no command stream validation/relocation due to each user process has its own GPU virtual address space. GP/PP's MMU switch virtual address space before running two tasks from different user process. Error or evil user space code just get MMU fault or GP/PP error IRQ, then the HW/SW will be recovered.
- Use GEM+shmem for MM. Currently just alloc and pin memory when gem object creation. GPU vm map of the buffer is also done in the alloc stage in kernel space. We may delay the memory allocation and real GPU vm map to command submission stage in the furture as improvement.
- Use drm_sched for GPU task schedule. Each OpenGL context should have a lima context object in the kernel to distinguish tasks from different user. drm_sched gets task from each lima context in a fair way.

mesa driver can be found here before upstreamed:
https://gitlab.freedesktop.org/lima/mesa

v8:
- add comments for in_sync
- fix ctx free miss mutex unlock

v7:
- remove lima_fence_ops with default value
- move fence slab create to device probe
- check pad ioctl args to be zero
- add comments for user/kernel interface

v6:
- fix comments by checkpatch.pl

v5:
- export gp/pp version to userspace
- rebase on drm-misc-next

v4:
- use get param interface to get info
- separate context create/free ioctl
- remove unused max sched task param
- update copyright time
- use xarray instead of idr
- stop using drmP.h

v3:
- fix comments from kbuild robot
- restrict supported arch to tested ones

v2:
- fix syscall argument check
- fix job finish fence leak since kernel 5.0
- use drm syncobj to replace native fence
- move buffer object GPU va map into kernel
- reserve syscall argument space for future info
- remove kernel gem modifier
- switch TTM back to GEM+shmem MM
- use time based io poll
- use whole register name
- adopt gem reservation obj integration
- use drm_timeout_abs_to_jiffies

---

Quoted 3 lines
Quoted 1 line

[...]

I thought get your RB last time, should I remove it?

I read Rob's comment as "if you need to resent for any other reason then you could modify for that patch, but no need to resend everything just for this", so a RB can probably stay as it is.

Heiko

Quoted 8 lines
Quoted 3 lines

Not to make you keep shooting for a moving target, Eric just posted a patch[1] a few days ago that can replace these 2 functions. Would be good to use if you respin, but otherwise can be a follow-on patch.

Thanks for the remind.

Regards,
Qiang

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to Neil Armstrong
Quoted 10 lines · Neil Armstrong

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

It's also waiting on mesa bits to land or at least be close having a MR[1]. Nothing in the discussion seems to affect the uapi, so maybe this can be merged now.

Rob

[1] https://gitlab.freedesktop.org/mesa/mesa/merge_requests/465
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
Quoted 7 lines · Rob Herring
Quoted 6 lines · Neil Armstrong

Hi,

Quoted 2 lines · Vasily Khoruzhick

Hi,

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

It's also waiting on mesa bits to land or at least be close having a MR[1]. Nothing in the discussion seems to affect the uapi, so maybe this can be merged now.

Kernel lands first, Mesa is stalled because we're we can't merge until the kernel's in drm-next.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw
In reply to Neil Armstrong
Quoted 9 lines · Neil Armstrong

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

I don't see any dependency of this patch on the modifier definition.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
Quoted 5 lines · Eric Anholt
Quoted 3 lines · Neil Armstrong

Hi,

On 26/03/2019 21:40, Vasily Khoruzhick wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

I don't see any dependency of this patch on the modifier definition.

Indeed no direct dependency, so no reason to not apply it.

Daniel, who should merge this then ?

Neil

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
Quoted 13 lines · Neil Armstrong
Quoted 12 lines · Eric Anholt
Quoted 9 lines · Neil Armstrong

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

Quoted 6 lines
Quoted 2 lines

I don't see any dependency of this patch on the modifier definition.

Indeed no direct dependency, so no reason to not apply it.

Daniel, who should merge this then ?

Add Quang as drm-misc maintainer, merge it there? At least a pile of people participating in that thread are committers already. Either way needs a MAINTAINERS entry to note where it actually is.

Ideally I guess we'd stuff it into the same place as panfrost later on. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw
Quoted 17 lines · Daniel Vetter
Quoted 16 lines · Neil Armstrong
Quoted 14 lines · Eric Anholt
Quoted 9 lines · Neil Armstrong

Hi,

Quoted 3 lines · Vasily Khoruzhick

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

I don't see any dependency of this patch on the modifier definition.

Quoted 7 lines
Quoted 3 lines

Indeed no direct dependency, so no reason to not apply it.

Daniel, who should merge this then ?

Add Quang as drm-misc maintainer, merge it there? At least a pile of people participating in that thread are committers already. Either way needs a MAINTAINERS entry to note where it actually is.

I'm a fan of that solution. Though, I'd be willing to apply it myself with just the MAINTAINERS entry sorted out.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#16 lore raw
Quoted 22 lines · Eric Anholt
Quoted 19 lines · Daniel Vetter
Quoted 18 lines · Neil Armstrong
Quoted 5 lines · Eric Anholt
Quoted 3 lines · Neil Armstrong

Hi,

On 26/03/2019 21:40, Vasily Khoruzhick wrote:

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Hi,

So what's the status of it?

We are waiting on ARM to give a feedback on the ARM GPU tile modifier, see https://patchwork.freedesktop.org/patch/292187/?series=57996&rev=1

I don't see any dependency of this patch on the modifier definition.

Indeed no direct dependency, so no reason to not apply it.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Daniel, who should merge this then ?

Add Quang as drm-misc maintainer, merge it there? At least a pile of people participating in that thread are committers already. Either way needs a MAINTAINERS entry to note where it actually is.

I'm a fan of that solution. Though, I'd be willing to apply it myself with just the MAINTAINERS entry sorted out.

Thanks you guys. I also request to be one of drm-misc maintainer so that I can push lima commits in the future without bother any of you every time.

I'll send out another patch to update the MAINTAINERS entry and push with this lima driver after I have the permission.

Thanks,
Qiang
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#17 lore raw

PATCH 1/1 MAINTAINERS: add drm/lima driver info

In reply to Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:	Maintained
 F:	drivers/gpu/drm/hisilicon/
 F:	Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:	Qiang Yu <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/gpu/drm/lima/
+F:	include/uapi/drm/lima_drm.h
+T:	git git://anongit.freedesktop.org/drm/drm-misc
+
 DRM DRIVERS FOR MEDIATEK
 M:	CK Hu <[email protected]>
 M:	Philipp Zabel <[email protected]>
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Acked-by on v1 1/1
#18 lore raw

Re: [Lima] [PATCH] MAINTAINERS: add drm/lima driver info

Quoted 16 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +2 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:	Maintained
 F:	drivers/gpu/drm/hisilicon/
 F:	Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:	Qiang Yu <[email protected]>

MAINTAINERS S: Maintained · line 5115

Quoted 10 lines
MAINTAINERS +7 -0
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/gpu/drm/lima/
+F:	include/uapi/drm/lima_drm.h
+T:	git git://anongit.freedesktop.org/drm/drm-misc
+
 DRM DRIVERS FOR MEDIATEK
 M:	CK Hu <[email protected]>
 M:	Philipp Zabel <[email protected]>

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Acked-by on v1 1/1
#19 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

In reply to Qiang Yu
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:	Maintained
 F:	drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:	Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:	Qiang Yu <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/gpu/drm/lima/
+F:	include/uapi/drm/lima_drm.h
+T:	git git://anongit.freedesktop.org/drm/drm-misc

btw where's your fdo account request so I can ack your drm-misc rights? For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

Cheers, Daniel

Quoted 7 lines
MAINTAINERS +1 -0
+
 DRM DRIVERS FOR MEDIATEK
 M:	CK Hu <[email protected]>
 M:	Philipp Zabel <[email protected]>
Signature · 1 line
2.17.1
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#20 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

Quoted 26 lines · Daniel Vetter
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:     Maintained
 F:   drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:   Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:   Qiang Yu <[email protected]>
+L:   [email protected]
+L:   [email protected]
+S:   Maintained
+F:   drivers/gpu/drm/lima/
+F:   include/uapi/drm/lima_drm.h
+T:   git git://anongit.freedesktop.org/drm/drm-misc
Quoted 1 line

btw where's your fdo account request so I can ack your drm-misc rights?

Here it is:
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/139

Quoted 4 lines

For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

OK, thanks.

Hi Eric, please go ahead to push the lima driver and this patch, thanks.

Regards,
Qiang
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

Quoted 31 lines · Qiang Yu
Quoted 26 lines · Daniel Vetter
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:     Maintained
 F:   drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:   Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:   Qiang Yu <[email protected]>
+L:   [email protected]
+L:   [email protected]
+S:   Maintained
+F:   drivers/gpu/drm/lima/
+F:   include/uapi/drm/lima_drm.h
+T:   git git://anongit.freedesktop.org/drm/drm-misc
Quoted 1 line

btw where's your fdo account request so I can ack your drm-misc rights?

Here it is:
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/139

Quoted 7 lines
Quoted 4 lines

For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

OK, thanks.

Hi Eric, please go ahead to push the lima driver and this patch, thanks.

Did builds on x86_64, arm64, and arm, and all looked good. Merged now. Congrats!

Once this hits drm-next, we'll be ready to merge the Mesa side.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#22 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

Quoted 38 lines · Eric Anholt
Quoted 35 lines · Qiang Yu
Quoted 26 lines · Daniel Vetter
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:     Maintained
 F:   drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:   Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:   Qiang Yu <[email protected]>
+L:   [email protected]
+L:   [email protected]
+S:   Maintained
+F:   drivers/gpu/drm/lima/
+F:   include/uapi/drm/lima_drm.h
+T:   git git://anongit.freedesktop.org/drm/drm-misc
Quoted 1 line

btw where's your fdo account request so I can ack your drm-misc rights?

Here it is:
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/139

Quoted 4 lines

For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

Quoted 8 lines
Quoted 3 lines

OK, thanks.

Hi Eric, please go ahead to push the lima driver and this patch, thanks.

Did builds on x86_64, arm64, and arm, and all looked good. Merged now. Congrats!

Once this hits drm-next, we'll be ready to merge the Mesa side.

Thanks very much!

Regards,
Qiang
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#23 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

Hi guys,

I have some questions after reading the drm maintainer tools doc:
https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html

1. As a committer to drm-misc, do I still need to use dim? Wouldn't just raw git commands enough? For example just "git push" to the target drm-misc branch.

2. Any special care need to take before push? Like need to test on some public CI/CD system or just test locally on affected functionality and arch is enough?

3. Do drm-misc have plan to move to gitlab?

Thanks,
Qiang

Quoted 47 lines · Qiang Yu
Quoted 45 lines · Eric Anholt
Quoted 31 lines · Qiang Yu
Quoted 26 lines · Daniel Vetter
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:     Maintained
 F:   drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:   Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:   Qiang Yu <[email protected]>
+L:   [email protected]
+L:   [email protected]
+S:   Maintained
+F:   drivers/gpu/drm/lima/
+F:   include/uapi/drm/lima_drm.h
+T:   git git://anongit.freedesktop.org/drm/drm-misc
Quoted 1 line

btw where's your fdo account request so I can ack your drm-misc rights?

Here it is:
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/139

Quoted 7 lines
Quoted 4 lines

For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

OK, thanks.

Hi Eric, please go ahead to push the lima driver and this patch, thanks.

Did builds on x86_64, arm64, and arm, and all looked good. Merged now. Congrats!

Quoted 6 lines
Quoted 1 line

Once this hits drm-next, we'll be ready to merge the Mesa side.

Thanks very much!

Regards,
Qiang

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#24 lore raw

Re: [PATCH] MAINTAINERS: add drm/lima driver info

Quoted 9 lines · Qiang Yu

Hi guys,

I have some questions after reading the drm maintainer tools doc:
https://drm.pages.freedesktop.org/maintainer-tools/getting-started.html

1. As a committer to drm-misc, do I still need to use dim? Wouldn't just raw git commands enough? For example just "git push" to the target drm-misc branch.

Yes, there's a pile of sanity checks in dim to make sure there's no screw-ups. Everytime a new screw-up happens we try to improve the tooling. So both patch applying and pushing must be done with dim.

Quoted 3 lines

2. Any special care need to take before push? Like need to test on some public CI/CD system or just test locally on affected functionality and arch is enough?

Unfortunately that's the one part not automated by dim, because cross-compiler setups are too tricky. There's a few defconfigs in the drm-rerere directory (that dim creates) which at least I myself use for compile testing. So that still needs to be done.

Quoted 1 line

3. Do drm-misc have plan to move to gitlab?

Yes, because we want to put all these checks server side (using gitlab CI). Unfortunately it's held up with some infrastructure work. See
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/69 for current status.

Thanks, Daniel

Quoted 58 lines

Thanks,
Qiang

Quoted 53 lines · Qiang Yu
Quoted 38 lines · Eric Anholt
Quoted 35 lines · Qiang Yu
Quoted 26 lines · Daniel Vetter
Quoted 11 lines · Qiang Yu
---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +0 -0
index f8e63bcc4c1c..cd2d632b713d 100644
@@ -5101,6 +5101,15 @@ S:     Maintained
 F:   drivers/gpu/drm/hisilicon/

MAINTAINERS S: Maintained · line 5111

Quoted 10 lines
MAINTAINERS +8 -0
 F:   Documentation/devicetree/bindings/display/hisilicon/
 
+DRM DRIVERS FOR LIMA
+M:   Qiang Yu <[email protected]>
+L:   [email protected]
+L:   [email protected]
+S:   Maintained
+F:   drivers/gpu/drm/lima/
+F:   include/uapi/drm/lima_drm.h
+T:   git git://anongit.freedesktop.org/drm/drm-misc
Quoted 1 line

btw where's your fdo account request so I can ack your drm-misc rights?

Here it is:
https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/139

Quoted 4 lines

For merging I think Eric already volunteered, and for questions I think there's enough experienced drm-misc committers in this thread for smooth learning for you.

Quoted 8 lines
Quoted 3 lines

OK, thanks.

Hi Eric, please go ahead to push the lima driver and this patch, thanks.

Did builds on x86_64, arm64, and arm, and all looked good. Merged now. Congrats!

Once this hits drm-next, we'll be ready to merge the Mesa side.

Thanks very much!

Regards,
Qiang

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel