linux-2.6-microblaze.git
4 years agodrm/nouveau/kms/nv04: convert page_flip() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 09:39:36 +0000 (19:39 +1000)]
drm/nouveau/kms/nv04: convert page_flip() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv04: convert page_flip_emit() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 09:36:18 +0000 (19:36 +1000)]
drm/nouveau/kms/nv04: convert page_flip_emit() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/svm: convert migrate_clear to new push macros
Ben Skeggs [Mon, 22 Jun 2020 09:04:55 +0000 (19:04 +1000)]
drm/nouveau/svm: convert migrate_clear to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/svm: convert migrate_copy to new push macros
Ben Skeggs [Mon, 22 Jun 2020 09:04:43 +0000 (19:04 +1000)]
drm/nouveau/svm: convert migrate_copy to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/bo: convert move move() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 06:20:32 +0000 (16:20 +1000)]
drm/nouveau/bo: convert move move() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/bo: convert move init() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 05:54:52 +0000 (15:54 +1000)]
drm/nouveau/bo: convert move init() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/bo: split buffer move functions into their own source files
Ben Skeggs [Mon, 22 Jun 2020 05:37:19 +0000 (15:37 +1000)]
drm/nouveau/bo: split buffer move functions into their own source files

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/fbcon: convert copyarea() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 01:31:45 +0000 (11:31 +1000)]
drm/nouveau/fbcon: convert copyarea() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/fbcon: convert fillrect() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 01:31:56 +0000 (11:31 +1000)]
drm/nouveau/fbcon: convert fillrect() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/fbcon: convert imageblit() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 01:22:28 +0000 (11:22 +1000)]
drm/nouveau/fbcon: convert imageblit() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/fbcon: convert accel_init() to new push macros
Ben Skeggs [Mon, 22 Jun 2020 01:08:51 +0000 (11:08 +1000)]
drm/nouveau/fbcon: convert accel_init() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau: interop with new push macros
Ben Skeggs [Sat, 18 Jul 2020 08:06:30 +0000 (18:06 +1000)]
drm/nouveau: interop with new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: implement proper push buffer control logic
Ben Skeggs [Tue, 21 Jul 2020 01:34:07 +0000 (11:34 +1000)]
drm/nouveau/kms/nv50-: implement proper push buffer control logic

We had a, what was supposed to be temporary, hack in the KMS code where we'd
completely drain an EVO/NVD channel's push buffer when wrapping to the start
again, instead of treating it as a ring buffer.

Let's fix that, finally.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core crc_set_ctx() to new push macros
Ben Skeggs [Sat, 18 Jul 2020 07:42:27 +0000 (17:42 +1000)]
drm/nouveau/kms/nv50-: convert core crc_set_ctx() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core crc_set_src() to new push macros
Ben Skeggs [Sat, 18 Jul 2020 07:39:15 +0000 (17:39 +1000)]
drm/nouveau/kms/nv50-: convert core crc_set_src() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_or() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:28:36 +0000 (09:28 +1000)]
drm/nouveau/kms/nv50-: convert core head_or() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_procamp() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:25:19 +0000 (09:25 +1000)]
drm/nouveau/kms/nv50-: convert core head_procamp() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_dither() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:22:47 +0000 (09:22 +1000)]
drm/nouveau/kms/nv50-: convert core head_dither() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_ovly() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:20:29 +0000 (09:20 +1000)]
drm/nouveau/kms/nv50-: convert core head_ovly() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_base() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:19:28 +0000 (09:19 +1000)]
drm/nouveau/kms/nv50-: convert core head_base() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_curs_clr() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:17:11 +0000 (09:17 +1000)]
drm/nouveau/kms/nv50-: convert core head_curs_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_curs_set() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:14:25 +0000 (09:14 +1000)]
drm/nouveau/kms/nv50-: convert core head_curs_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_core_clr() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:07:28 +0000 (09:07 +1000)]
drm/nouveau/kms/nv50-: convert core head_core_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_core_set() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:06:18 +0000 (09:06 +1000)]
drm/nouveau/kms/nv50-: convert core head_core_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_olut_clr() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 23:00:52 +0000 (09:00 +1000)]
drm/nouveau/kms/nv50-: convert core head_olut_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_olut_set() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 22:58:11 +0000 (08:58 +1000)]
drm/nouveau/kms/nv50-: convert core head_olut_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_mode() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 22:51:03 +0000 (08:51 +1000)]
drm/nouveau/kms/nv50-: convert core head_mode() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core head_view() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 08:34:00 +0000 (18:34 +1000)]
drm/nouveau/kms/nv50-: convert core head_view() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core or_ctrl() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 07:20:39 +0000 (17:20 +1000)]
drm/nouveau/kms/nv50-: convert core or_ctrl() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core wndw_owner() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 07:12:16 +0000 (17:12 +1000)]
drm/nouveau/kms/nv50-: convert core wndw_owner() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core update() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 07:10:46 +0000 (17:10 +1000)]
drm/nouveau/kms/nv50-: convert core update() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core caps_init() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 07:06:41 +0000 (17:06 +1000)]
drm/nouveau/kms/nv50-: convert core caps_init() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert core init() to new push macros
Ben Skeggs [Sat, 20 Jun 2020 07:04:57 +0000 (17:04 +1000)]
drm/nouveau/kms/nv50-: convert core init() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw update() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 23:32:58 +0000 (09:32 +1000)]
drm/nouveau/kms/nv50-: convert wndw update() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw blend_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 23:25:55 +0000 (09:25 +1000)]
drm/nouveau/kms/nv50-: convert wndw blend_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw scale_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 23:24:21 +0000 (09:24 +1000)]
drm/nouveau/kms/nv50-: convert wndw scale_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw image_clr() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 23:23:10 +0000 (09:23 +1000)]
drm/nouveau/kms/nv50-: convert wndw image_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw image_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 23:20:17 +0000 (09:20 +1000)]
drm/nouveau/kms/nv50-: convert wndw image_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw xlut_clr() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:50:50 +0000 (08:50 +1000)]
drm/nouveau/kms/nv50-: convert wndw xlut_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw xlut_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:47:20 +0000 (08:47 +1000)]
drm/nouveau/kms/nv50-: convert wndw xlut_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw csc_clr() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:44:11 +0000 (08:44 +1000)]
drm/nouveau/kms/nv50-: convert wndw csc_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw csc_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:39:21 +0000 (08:39 +1000)]
drm/nouveau/kms/nv50-: convert wndw csc_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw ntfy_clr() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:32:28 +0000 (08:32 +1000)]
drm/nouveau/kms/nv50-: convert wndw ntfy_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw ntfy_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:29:31 +0000 (08:29 +1000)]
drm/nouveau/kms/nv50-: convert wndw ntfy_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw sema_clr() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 22:04:01 +0000 (08:04 +1000)]
drm/nouveau/kms/nv50-: convert wndw sema_clr() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wndw sema_set() to new push macros
Ben Skeggs [Fri, 19 Jun 2020 21:57:12 +0000 (07:57 +1000)]
drm/nouveau/kms/nv50-: convert wndw sema_set() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wimm update() to new push macros
Ben Skeggs [Sun, 21 Jun 2020 00:22:35 +0000 (10:22 +1000)]
drm/nouveau/kms/nv50-: convert wimm update() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: convert wimm point() to new push macros
Ben Skeggs [Sun, 21 Jun 2020 00:19:40 +0000 (10:19 +1000)]
drm/nouveau/kms/nv50-: convert wimm point() to new push macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interface
Ben Skeggs [Fri, 19 Jun 2020 21:52:26 +0000 (07:52 +1000)]
drm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interface

This commit pulls in a bunch of new push buffer macros which are able to
support NVIDIA's class headers, and provide more useful debug output and
error checking (compile-time, where possible) than we had previously.

Will incrementally transition each function over to the unified interfaces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: add support for object-level debug output
Ben Skeggs [Mon, 29 Jun 2020 10:49:15 +0000 (20:49 +1000)]
drm/nouveau/nvif: add support for object-level debug output

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every notify object a human-readable name
Ben Skeggs [Mon, 8 Jun 2020 04:47:37 +0000 (14:47 +1000)]
drm/nouveau/nvif: give every notify object a human-readable name

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every disp object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 04:03:20 +0000 (14:03 +1000)]
drm/nouveau/nvif: give every disp object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every usermode object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 04:01:57 +0000 (14:01 +1000)]
drm/nouveau/nvif: give every usermode object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every vmm object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 03:59:39 +0000 (13:59 +1000)]
drm/nouveau/nvif: give every vmm object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every mem object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 03:56:55 +0000 (13:56 +1000)]
drm/nouveau/nvif: give every mem object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every mmu object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 03:51:38 +0000 (13:51 +1000)]
drm/nouveau/nvif: give every mmu object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every device object a human-readable identifier
Ben Skeggs [Mon, 30 Mar 2020 03:49:05 +0000 (13:49 +1000)]
drm/nouveau/nvif: give every device object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: give every object a human-readable identifier
Ben Skeggs [Sun, 29 Mar 2020 23:51:33 +0000 (09:51 +1000)]
drm/nouveau/nvif: give every object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/nvif: rename client ctor/dtor
Ben Skeggs [Mon, 30 Mar 2020 03:45:33 +0000 (13:45 +1000)]
drm/nouveau/nvif: rename client ctor/dtor

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
4 years agodrm/nouveau/kms/tu102: set NVC57D_HEAD_SET_HEAD_USAGE_BOUNDS_UPSCALING_ALLOWED to...
Ben Skeggs [Fri, 24 Jul 2020 00:13:21 +0000 (10:13 +1000)]
drm/nouveau/kms/tu102: set NVC57D_HEAD_SET_HEAD_USAGE_BOUNDS_UPSCALING_ALLOWED to TRUE

Fixes issues when switching between scaling modes.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau: Use fallthrough pseudo-keyword
Gustavo A. R. Silva [Tue, 7 Jul 2020 17:36:28 +0000 (12:36 -0500)]
drm/nouveau: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/vmm/gp100-: fix mapping 2MB sysmem pages
Ralph Campbell [Tue, 30 Jun 2020 19:57:35 +0000 (12:57 -0700)]
drm/nouveau/vmm/gp100-: fix mapping 2MB sysmem pages

The nvif_object_ioctl() method NVIF_VMM_V0_PFNMAP wasn't correctly
setting the hardware specific GPU page table entries for 2MB sized
pages. Fix this by adding functions to set and clear PD0 GPU page
table entries.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/mmu: make nvkm_vmm_ctor() static
Ralph Campbell [Mon, 22 Jun 2020 23:38:54 +0000 (16:38 -0700)]
drm/nouveau/mmu: make nvkm_vmm_ctor() static

The function nvkm_vmm_ctor() is not called outside of the file defining
it, so make it static.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek
Aditya Pakki [Sun, 14 Jun 2020 01:48:37 +0000 (20:48 -0500)]
drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek

nouveau_debugfs_strap_peek() calls pm_runtime_get_sync() that
increments the reference count. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau: Fix reference count leak in nouveau_connector_detect
Aditya Pakki [Sun, 14 Jun 2020 01:22:23 +0000 (20:22 -0500)]
drm/nouveau: Fix reference count leak in nouveau_connector_detect

nouveau_connector_detect() calls pm_runtime_get_sync and in turn
increments the reference count. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau: fix reference count leak in nv50_disp_atomic_commit
Aditya Pakki [Sun, 14 Jun 2020 01:29:18 +0000 (20:29 -0500)]
drm/nouveau: fix reference count leak in nv50_disp_atomic_commit

nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn
increments the reference count. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau: fix multiple instances of reference count leaks
Aditya Pakki [Sun, 14 Jun 2020 01:41:56 +0000 (20:41 -0500)]
drm/nouveau: fix multiple instances of reference count leaks

On calling pm_runtime_get_sync() the reference count of the device
is incremented. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open
Aditya Pakki [Sun, 14 Jun 2020 01:33:42 +0000 (20:33 -0500)]
drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open

nouveau_fbcon_open() calls calls pm_runtime_get_sync() that
increments the reference count. In case of failure, decrement the
ref count before returning the error.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/sec2/gp102: allow module to load when LSFW is missing
Ben Skeggs [Tue, 16 Jun 2020 00:41:49 +0000 (10:41 +1000)]
drm/nouveau/sec2/gp102: allow module to load when LSFW is missing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/gr/gm200-: explicitly handle nofw
Ben Skeggs [Tue, 16 Jun 2020 01:30:04 +0000 (11:30 +1000)]
drm/nouveau/gr/gm200-: explicitly handle nofw

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/pmu/gm200-: explicitly handle nofw
Ben Skeggs [Tue, 16 Jun 2020 05:26:20 +0000 (15:26 +1000)]
drm/nouveau/pmu/gm200-: explicitly handle nofw

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/pmu/gm20x: don't pretend we support loading with our custom FW
Ben Skeggs [Tue, 16 Jun 2020 05:15:58 +0000 (15:15 +1000)]
drm/nouveau/pmu/gm20x: don't pretend we support loading with our custom FW

It technically loads, and runs, but is ultimately pointless outside of
a very narrow window (fanless systems where one wants to attempt using
the, broken for a lot of gm20x, memory reclocking code).

It's also potentially dangerous to override the VBIOS-provided "Pre-OS"
PMU, which would be responsible for fan control otherwise.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/acr: store a mask of LS falcons the controlling LSFW can bootstrap
Ben Skeggs [Tue, 16 Jun 2020 04:57:31 +0000 (14:57 +1000)]
drm/nouveau/acr: store a mask of LS falcons the controlling LSFW can bootstrap

This will prevent some pain with broken firmware trees, as under some
circumstances the HSFW can fail and leave the GPU in a state we don't
know how to recover from.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/acr: store a mask of LS falcons the HSFW can bootstrap
Ben Skeggs [Tue, 16 Jun 2020 04:19:35 +0000 (14:19 +1000)]
drm/nouveau/acr: store a mask of LS falcons the HSFW can bootstrap

This will prevent reloading of HS FW where it's pointless, and bypass
hitting some timeouts.

Not a situation one should generally hit, but can occur with a messed
up firmware installation.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/acr: allow module to load when HSFW(s) are missing
Ben Skeggs [Tue, 16 Jun 2020 00:47:07 +0000 (10:47 +1000)]
drm/nouveau/acr: allow module to load when HSFW(s) are missing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/acr: refuse to load LSFW if HSFW is missing
Ben Skeggs [Tue, 16 Jun 2020 01:38:47 +0000 (11:38 +1000)]
drm/nouveau/acr: refuse to load LSFW if HSFW is missing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/core: drop error message when no compatible FW found
Ben Skeggs [Tue, 16 Jun 2020 01:14:41 +0000 (11:14 +1000)]
drm/nouveau/core: drop error message when no compatible FW found

This is less than useful with some subdevs having _nofw variants in their
FWIF lists - it's cleaner to handle them all in the same way.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/mmu/gp100-: enable mmu invalidate depth optimisation
Ben Skeggs [Wed, 10 Jun 2020 04:46:01 +0000 (14:46 +1000)]
drm/nouveau/mmu/gp100-: enable mmu invalidate depth optimisation

This causes us to invalidate MMU only at the level we made modifications -
ie: if we've only modified PTEs, there's no need to have MMU dump the PDs
it's fetched into L2.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/nvfw: firmware structures should begin with nvfw_
Timur Tabi [Tue, 9 Jun 2020 12:52:04 +0000 (07:52 -0500)]
drm/nouveau/nvfw: firmware structures should begin with nvfw_

Rename all structures that are used directly by firmware to have a nvfw_
prefix.

This makes it easier to identify structures that have a fixed, specific
layout.  A future patch will define several more such structures, so it's
important to be consistent now.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/tmr: fix nvkm_usec/nvkm_msec definitions
Timur Tabi [Tue, 9 Jun 2020 12:52:03 +0000 (07:52 -0500)]
drm/nouveau/tmr: fix nvkm_usec/nvkm_msec definitions

nvkm_timer_wait_init() takes a u64 as a duration parameter, but the
expression "(m) * 1000" will be promoted only to a 32-bit integer,
if 'm' is also an integer.  Changing the 1000 to 1000ULL ensures that
the expression will be 64 bits.

This change currently has no effect as there are no callers of
nvkm_msec() that exceed 2000ms.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/therm/gt215: make gt215_therm_init static
Ben Skeggs [Fri, 29 May 2020 23:55:19 +0000 (09:55 +1000)]
drm/nouveau/therm/gt215: make gt215_therm_init static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/mmu: make a couple of functions static
Ben Skeggs [Fri, 29 May 2020 23:54:26 +0000 (09:54 +1000)]
drm/nouveau/mmu: make a couple of functions static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/mc/gp10b: make gp10b_mc_init static
Ben Skeggs [Fri, 29 May 2020 23:53:57 +0000 (09:53 +1000)]
drm/nouveau/mc/gp10b: make gp10b_mc_init static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/nvfw/acr: make lsb_header_tail_dump static
Ben Skeggs [Fri, 29 May 2020 23:35:55 +0000 (09:35 +1000)]
drm/nouveau/nvfw/acr: make lsb_header_tail_dump static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/gr/gf100-: make some functions static
Ben Skeggs [Fri, 29 May 2020 23:34:08 +0000 (09:34 +1000)]
drm/nouveau/gr/gf100-: make some functions static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agodrm/nouveau/disp/gm200-: remove 'head' parameter from nvkm_ior_func.hdmi.scdc()
Ben Skeggs [Fri, 29 May 2020 05:14:49 +0000 (15:14 +1000)]
drm/nouveau/disp/gm200-: remove 'head' parameter from nvkm_ior_func.hdmi.scdc()

It's no longer required.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4 years agoMerge tag 'mediatek-drm-next-5.9' of https://git.kernel.org/pub/scm/linux/kernel...
Dave Airlie [Thu, 23 Jul 2020 23:41:48 +0000 (09:41 +1000)]
Merge tag 'mediatek-drm-next-5.9' of https://git./linux/kernel/git/chunkuang.hu/linux into drm-next

Mediatek DRM Next for Linux 5.9

This include converting mtk_dsi to drm_bridge API.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200716233102.566-1-chunkuang.hu@kernel.org
4 years agoMerge tag 'drm/tegra/for-5.9-rc1' of ssh://git.freedesktop.org/git/tegra/linux into...
Dave Airlie [Thu, 23 Jul 2020 23:38:44 +0000 (09:38 +1000)]
Merge tag 'drm/tegra/for-5.9-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next

drm/tegra: Changes for v5.9-rc1

This set of patches contains a few preparatory patches to enable video
capture support from external camera modules. This is a dependency for
the V4L2 driver patches that will likely be merged in v5.9 or v5.10.

On top of that there are a couple of fixes across the board as well as
some improvements.

From a feature point of view this also adds support for horizontal
reflection and 180° rotation of planes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200717162011.1661788-1-thierry.reding@gmail.com
4 years agoMerge v5.8-rc6 into drm-next
Dave Airlie [Thu, 23 Jul 2020 22:28:09 +0000 (08:28 +1000)]
Merge v5.8-rc6 into drm-next

I've got a silent conflict + two trees based on fixes to merge.

Fixes a silent merge with amdgpu

Signed-off-by: Dave Airlie <airlied@redhat.com>
4 years agoMerge tag 'amd-drm-next-5.9-2020-07-17' of git://people.freedesktop.org/~agd5f/linux...
Dave Airlie [Thu, 23 Jul 2020 05:38:10 +0000 (15:38 +1000)]
Merge tag 'amd-drm-next-5.9-2020-07-17' of git://people.freedesktop.org/~agd5f/linux into drm-next

amd-drm-next-5.9-2020-07-17:

amdgpu:
- SI UVD/VCE clock support
- Updates for Sienna Cichlid
- Expose drm rotation property
- Atomfirmware updates for renoir
- updates to GPUVM hub handling for different register layouts
- swSMU restructuring and cleanups
- RAS fixes
- DC fixes
- mode1 reset support for Sienna Cichlid
- Add support for Navy Flounder GPUs

amdkfd:
- Add SMI events watch interface

UAPI:
- Add amdkfd SMI events watch interface
  Userspace which uses this interface:
  https://github.com/RadeonOpenCompute/rocm_smi_lib/commit/2235ede34c456f1c7d3490f6fe74825d442d272e

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200717132022.4014-1-alexander.deucher@amd.com
4 years agoMerge tag 'drm-xilinx-dpsub-20200718' of git://linuxtv.org/pinchartl/media into drm...
Dave Airlie [Thu, 23 Jul 2020 05:31:29 +0000 (15:31 +1000)]
Merge tag 'drm-xilinx-dpsub-20200718' of git://linuxtv.org/pinchartl/media into drm-next

Xilinx ZynqMP DisplayPort Subsystem driver

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200718001755.GA5962@pendragon.ideasonboard.com
4 years agoMerge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm...
Dave Airlie [Thu, 23 Jul 2020 05:28:05 +0000 (15:28 +1000)]
Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next

Nothing too exciting:
- a cleanup of our clock handling and improved error handling in this
area from Lubomir
- conversion to pin_user_pages for long page references from John
- fixed PM runtime API error handling from Navid

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/d9e2660d71051bf3cab8aa7afc9f62102ac910d9.camel@pengutronix.de
4 years agoMerge tag 'imx-drm-next-2020-07-20' of git://git.pengutronix.de/pza/linux into drm...
Dave Airlie [Thu, 23 Jul 2020 05:21:32 +0000 (15:21 +1000)]
Merge tag 'imx-drm-next-2020-07-20' of git://git.pengutronix.de/pza/linux into drm-next

drm/imx: error path fixes and cleanups

- Fix use after free issue in component bind error path by keeping
  memory allocated as long as the driver is bound. This will be replaced
  with drm managed memory in the next round.
- Fix bus_flags overriding logic in parallel-display.
- Disable regulator in imx-tve bind error path.
- Drop unnecessary best_encoder callback.
- Remove an unused enum in imx-ldb.
- Bail out early on missing panel or bridge in parallel-display to speed
  up -EPROBE_DEFER path.
- Disable both LDB channels in split mode.
- Restore RGB32, BGR32 format support.
- Fix tiled image conversion in case of out of order interrupts.
- Remove a superfluous error message in imx-tve.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/ac4452eb3a989bf5d85b65fd30840a21f15ec301.camel@pengutronix.de
4 years agodma-fence: Make symbol 'dma_fence_lockdep_map' static
Wei Yongjun [Wed, 22 Jul 2020 16:17:19 +0000 (16:17 +0000)]
dma-fence: Make symbol 'dma_fence_lockdep_map' static

The sparse tool complains as follows:

drivers/dma-buf/dma-fence.c:249:25: warning:
symbol 'dma_fence_lockdep_map' was not declared. Should it be static?

This variable is not used outside of dma-fence.c, so this commit
marks it static.

Fixes: 5fbff813a4a3 ("dma-fence: basic lockdep annotations")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/dc5e3b19-2087-44ab-a28c-ddb38ff8861a@email.android.com
4 years agoMerge tag 'drm-misc-next-2020-07-22' of git://anongit.freedesktop.org/drm/drm-misc...
Dave Airlie [Thu, 23 Jul 2020 04:01:37 +0000 (14:01 +1000)]
Merge tag 'drm-misc-next-2020-07-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next for v5.9:

UAPI Changes:

Cross-subsystem Changes:
- Convert panel-dsi-cm and ingenic bindings to YAML.
- Add lockdep annotations for dma-fence. \o/
- Describe why indefinite fences are a bad idea
- Update binding for rocktech jh057n00900.

Core Changes:
- Add vblank workers.
- Use spin_(un)lock_irq instead of the irqsave/restore variants in crtc code.
- Add managed vram helpers.
- Convert more logging to drm functions.
- Replace more http links with https in core and drivers.
- Cleanup to ttm iomem functions and implementation.
- Remove TTM CMA memtype as it doesn't work correctly.
- Remove TTM_MEMTYPE_FLAG_MAPPABLE for many drivers that have no
  unmappable memory resources.

Driver Changes:
- Add CRC support to nouveau, using the new vblank workers.
- Dithering and atomic state fix for nouveau.
- Fixes for Frida FRD350H54004 panel.
- Add support for OSD mode (sprite planes), IPU (scaling) and multiple
  panels/bridges to ingenic.
- Use managed vram helpers in ast.
- Assorted small fixes to ingenic, i810, mxsfb.
- Remove optional unused ttm dummy functions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d6bf269e-ccb2-8a7b-fdae-226e9e3f8274@linux.intel.com
4 years agodt-binding: display: Allow a single port node on rocktech, jh057n00900
Ondrej Jirman [Fri, 3 Jul 2020 11:47:17 +0000 (13:47 +0200)]
dt-binding: display: Allow a single port node on rocktech, jh057n00900

The display has one port. Allow it in the binding.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200703114717.2140832-3-megous@megous.com
4 years agodt-bindings: display: Fix example in nwl-dsi.yaml
Ondrej Jirman [Fri, 3 Jul 2020 11:47:16 +0000 (13:47 +0200)]
dt-bindings: display: Fix example in nwl-dsi.yaml

The example is now validated against rocktech,jh057n00900 schema
that was ported to yaml, and didn't validate with:

- '#address-cells', '#size-cells', 'port@0' do not match any of
  the regexes: 'pinctrl-[0-9]+'
- 'vcc-supply' is a required property
- 'iovcc-supply' is a required property
- 'reset-gpios' is a required property

Fix it.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200703114717.2140832-2-megous@megous.com
4 years agodrm/vblank: Use spin_(un)lock_irq() in drm_crtc_queue_sequence_ioctl()
Lyude Paul [Mon, 20 Jul 2020 19:07:36 +0000 (15:07 -0400)]
drm/vblank: Use spin_(un)lock_irq() in drm_crtc_queue_sequence_ioctl()

This is an ioctl callback, so we're guaranteed to have IRQs enabled when
calling this function. Use the plain _irq() variants of spin_(un)lock()
to make this more obvious.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-6-lyude@redhat.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
4 years agodrm/vblank: Use spin_(un)lock_irq() in drm_queue_vblank_event()
Lyude Paul [Mon, 20 Jul 2020 19:07:35 +0000 (15:07 -0400)]
drm/vblank: Use spin_(un)lock_irq() in drm_queue_vblank_event()

This one's easy - we're already calling kzalloc(GFP_KERNEL) in this
function, so we must already be guaranteed to have IRQs enabled when
calling this. So, use the plain _irq() variants of spin_(un)lock() to
make this more obvious.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-5-lyude@redhat.com
4 years agodrm/vblank: Use spin_(un)lock_irq() in drm_legacy_vblank_post_modeset()
Lyude Paul [Mon, 20 Jul 2020 19:07:34 +0000 (15:07 -0400)]
drm/vblank: Use spin_(un)lock_irq() in drm_legacy_vblank_post_modeset()

This function is only ever called from ioctl context, so we're
guaranteed to have interrupts enabled. Stop using the irqsave/irqrestore
variants of spin_(un)lock_irq() to make this more obvious.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-4-lyude@redhat.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>