Skip to content

Commit 66a2df8

Browse files
committed
Merge: RHEL9.6 drm backport main
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5436 # Merge Request Required Information ## Summary of Changes Depends: !5592 Depends: !5437 Depends: !5883 JIRA: https://issues.redhat.com/browse/RHEL-53570 JIRA: https://issues.redhat.com/browse/RHEL-64034 Omitted-fix: f673055 Omitted-fix: 4a33aa3 Signed-off-by: Robert Foss <rfoss@redhat.com> ## Approved Development Ticket All submissions to CentOS Stream must reference an approved ticket in [Red Hat Jira](https://issues.redhat.com/). Please follow the CentOS Stream [contribution documentation](https://docs.centos.org/en-US/stream-contrib/quickstart/) for how to file this ticket and have it approved. Approved-by: Jocelyn Falempe <jfalempe@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Eric Chanudet <echanude@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 849365e + c0b6b72 commit 66a2df8

File tree

2,520 files changed

+470090
-54669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,520 files changed

+470090
-54669
lines changed

Documentation/gpu/i915.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ High Definition Audio
150150
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c
151151
:internal:
152152

153-
.. kernel-doc:: include/drm/i915_component.h
153+
.. kernel-doc:: include/drm/intel/i915_component.h
154154
:internal:
155155

156156
Intel HDMI LPE Audio Support

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6344,6 +6344,7 @@ R: Jernej Skrabec <jernej.skrabec@gmail.com>
63446344
S: Maintained
63456345
T: git git://anongit.freedesktop.org/drm/drm-misc
63466346
F: drivers/gpu/drm/bridge/
6347+
F: drivers/gpu/drm/display/drm_bridge_connector.c
63476348

63486349
DRM DRIVERS FOR EXYNOS
63496350
M: Inki Dae <inki.dae@samsung.com>

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ NAME = Opossums on Parade
88
# DRM backport version
99
#
1010
RHEL_DRM_VERSION = 6
11-
RHEL_DRM_PATCHLEVEL = 9
12-
RHEL_DRM_SUBLEVEL = 11
11+
RHEL_DRM_PATCHLEVEL = 12
12+
RHEL_DRM_SUBLEVEL =
1313

1414
# *DOCUMENTATION*
1515
# To see a list of typical targets execute "make help"

arch/x86/kernel/early-quirks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <linux/bcma/bcma.h>
1818
#include <linux/bcma/bcma_regs.h>
1919
#include <linux/platform_data/x86/apple.h>
20-
#include <drm/i915_drm.h>
21-
#include <drm/i915_pciids.h>
20+
#include <drm/intel/i915_drm.h>
21+
#include <drm/intel/i915_pciids.h>
2222
#include <asm/pci-direct.h>
2323
#include <asm/dma.h>
2424
#include <asm/io_apic.h>

drivers/char/agp/intel-agp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <asm/smp.h>
1313
#include "agp.h"
1414
#include "intel-agp.h"
15-
#include <drm/intel-gtt.h>
15+
#include <drm/intel/intel-gtt.h>
1616

1717
static int intel_fetch_size(void)
1818
{

drivers/char/agp/intel-gtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <asm/smp.h>
2626
#include "agp.h"
2727
#include "intel-agp.h"
28-
#include <drm/intel-gtt.h>
28+
#include <drm/intel/intel-gtt.h>
2929
#include <asm/set_memory.h>
3030

3131
/*

drivers/dma-buf/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config UDMABUF
3535
default n
3636
depends on DMA_SHARED_BUFFER
3737
depends on MEMFD_CREATE || COMPILE_TEST
38+
depends on MMU
3839
help
3940
A driver to let userspace turn memfd regions into dma-bufs.
4041
Qemu can use this to create host dmabufs for guest framebuffers.

drivers/dma-buf/dma-buf.c

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,35 @@
3535

3636
static inline int is_dma_buf_file(struct file *);
3737

38-
struct dma_buf_list {
39-
struct list_head head;
40-
struct mutex lock;
41-
};
38+
#if IS_ENABLED(CONFIG_DEBUG_FS)
39+
static DEFINE_MUTEX(debugfs_list_mutex);
40+
static LIST_HEAD(debugfs_list);
4241

43-
static struct dma_buf_list db_list;
42+
static void __dma_buf_debugfs_list_add(struct dma_buf *dmabuf)
43+
{
44+
mutex_lock(&debugfs_list_mutex);
45+
list_add(&dmabuf->list_node, &debugfs_list);
46+
mutex_unlock(&debugfs_list_mutex);
47+
}
48+
49+
static void __dma_buf_debugfs_list_del(struct dma_buf *dmabuf)
50+
{
51+
if (!dmabuf)
52+
return;
53+
54+
mutex_lock(&debugfs_list_mutex);
55+
list_del(&dmabuf->list_node);
56+
mutex_unlock(&debugfs_list_mutex);
57+
}
58+
#else
59+
static void __dma_buf_debugfs_list_add(struct dma_buf *dmabuf)
60+
{
61+
}
62+
63+
static void __dma_buf_debugfs_list_del(struct file *file)
64+
{
65+
}
66+
#endif
4467

4568
static char *dmabuffs_dname(struct dentry *dentry, char *buffer, int buflen)
4669
{
@@ -89,17 +112,10 @@ static void dma_buf_release(struct dentry *dentry)
89112

90113
static int dma_buf_file_release(struct inode *inode, struct file *file)
91114
{
92-
struct dma_buf *dmabuf;
93-
94115
if (!is_dma_buf_file(file))
95116
return -EINVAL;
96117

97-
dmabuf = file->private_data;
98-
if (dmabuf) {
99-
mutex_lock(&db_list.lock);
100-
list_del(&dmabuf->list_node);
101-
mutex_unlock(&db_list.lock);
102-
}
118+
__dma_buf_debugfs_list_del(file->private_data);
103119

104120
return 0;
105121
}
@@ -673,9 +689,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
673689
file->f_path.dentry->d_fsdata = dmabuf;
674690
dmabuf->file = file;
675691

676-
mutex_lock(&db_list.lock);
677-
list_add(&dmabuf->list_node, &db_list.head);
678-
mutex_unlock(&db_list.lock);
692+
__dma_buf_debugfs_list_add(dmabuf);
679693

680694
return dmabuf;
681695

@@ -1612,7 +1626,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
16121626
size_t size = 0;
16131627
int ret;
16141628

1615-
ret = mutex_lock_interruptible(&db_list.lock);
1629+
ret = mutex_lock_interruptible(&debugfs_list_mutex);
16161630

16171631
if (ret)
16181632
return ret;
@@ -1621,7 +1635,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
16211635
seq_printf(s, "%-8s\t%-8s\t%-8s\t%-8s\texp_name\t%-8s\tname\n",
16221636
"size", "flags", "mode", "count", "ino");
16231637

1624-
list_for_each_entry(buf_obj, &db_list.head, list_node) {
1638+
list_for_each_entry(buf_obj, &debugfs_list, list_node) {
16251639

16261640
ret = dma_resv_lock_interruptible(buf_obj->resv, NULL);
16271641
if (ret)
@@ -1658,11 +1672,11 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
16581672

16591673
seq_printf(s, "\nTotal %d objects, %zu bytes\n", count, size);
16601674

1661-
mutex_unlock(&db_list.lock);
1675+
mutex_unlock(&debugfs_list_mutex);
16621676
return 0;
16631677

16641678
error_unlock:
1665-
mutex_unlock(&db_list.lock);
1679+
mutex_unlock(&debugfs_list_mutex);
16661680
return ret;
16671681
}
16681682

@@ -1719,8 +1733,6 @@ static int __init dma_buf_init(void)
17191733
if (IS_ERR(dma_buf_mnt))
17201734
return PTR_ERR(dma_buf_mnt);
17211735

1722-
mutex_init(&db_list.lock);
1723-
INIT_LIST_HEAD(&db_list.head);
17241736
dma_buf_init_debugfs();
17251737
return 0;
17261738
}

drivers/dma-buf/dma-fence-array.c

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void dma_fence_array_cb_func(struct dma_fence *f,
7070
static bool dma_fence_array_enable_signaling(struct dma_fence *fence)
7171
{
7272
struct dma_fence_array *array = to_dma_fence_array(fence);
73-
struct dma_fence_array_cb *cb = (void *)(&array[1]);
73+
struct dma_fence_array_cb *cb = array->callbacks;
7474
unsigned i;
7575

7676
for (i = 0; i < array->num_fences; ++i) {
@@ -144,46 +144,45 @@ const struct dma_fence_ops dma_fence_array_ops = {
144144
EXPORT_SYMBOL(dma_fence_array_ops);
145145

146146
/**
147-
* dma_fence_array_create - Create a custom fence array
147+
* dma_fence_array_alloc - Allocate a custom fence array
148+
* @num_fences: [in] number of fences to add in the array
149+
*
150+
* Return dma fence array on success, NULL on failure
151+
*/
152+
struct dma_fence_array *dma_fence_array_alloc(int num_fences)
153+
{
154+
struct dma_fence_array *array;
155+
156+
return kzalloc(struct_size(array, callbacks, num_fences), GFP_KERNEL);
157+
}
158+
EXPORT_SYMBOL(dma_fence_array_alloc);
159+
160+
/**
161+
* dma_fence_array_init - Init a custom fence array
162+
* @array: [in] dma fence array to arm
148163
* @num_fences: [in] number of fences to add in the array
149164
* @fences: [in] array containing the fences
150165
* @context: [in] fence context to use
151166
* @seqno: [in] sequence number to use
152167
* @signal_on_any: [in] signal on any fence in the array
153168
*
154-
* Allocate a dma_fence_array object and initialize the base fence with
155-
* dma_fence_init().
156-
* In case of error it returns NULL.
157-
*
158-
* The caller should allocate the fences array with num_fences size
159-
* and fill it with the fences it wants to add to the object. Ownership of this
160-
* array is taken and dma_fence_put() is used on each fence on release.
161-
*
162-
* If @signal_on_any is true the fence array signals if any fence in the array
163-
* signals, otherwise it signals when all fences in the array signal.
169+
* Implementation of @dma_fence_array_create without allocation. Useful to init
170+
* a preallocated dma fence array in the path of reclaim or dma fence signaling.
164171
*/
165-
struct dma_fence_array *dma_fence_array_create(int num_fences,
166-
struct dma_fence **fences,
167-
u64 context, unsigned seqno,
168-
bool signal_on_any)
172+
void dma_fence_array_init(struct dma_fence_array *array,
173+
int num_fences, struct dma_fence **fences,
174+
u64 context, unsigned seqno,
175+
bool signal_on_any)
169176
{
170-
struct dma_fence_array *array;
171-
size_t size = sizeof(*array);
172-
173177
WARN_ON(!num_fences || !fences);
174178

175-
/* Allocate the callback structures behind the array. */
176-
size += num_fences * sizeof(struct dma_fence_array_cb);
177-
array = kzalloc(size, GFP_KERNEL);
178-
if (!array)
179-
return NULL;
179+
array->num_fences = num_fences;
180180

181181
spin_lock_init(&array->lock);
182182
dma_fence_init(&array->base, &dma_fence_array_ops, &array->lock,
183183
context, seqno);
184184
init_irq_work(&array->work, irq_dma_fence_array_work);
185185

186-
array->num_fences = num_fences;
187186
atomic_set(&array->num_pending, signal_on_any ? 1 : num_fences);
188187
array->fences = fences;
189188

@@ -202,6 +201,41 @@ struct dma_fence_array *dma_fence_array_create(int num_fences,
202201
*/
203202
while (num_fences--)
204203
WARN_ON(dma_fence_is_container(fences[num_fences]));
204+
}
205+
EXPORT_SYMBOL(dma_fence_array_init);
206+
207+
/**
208+
* dma_fence_array_create - Create a custom fence array
209+
* @num_fences: [in] number of fences to add in the array
210+
* @fences: [in] array containing the fences
211+
* @context: [in] fence context to use
212+
* @seqno: [in] sequence number to use
213+
* @signal_on_any: [in] signal on any fence in the array
214+
*
215+
* Allocate a dma_fence_array object and initialize the base fence with
216+
* dma_fence_init().
217+
* In case of error it returns NULL.
218+
*
219+
* The caller should allocate the fences array with num_fences size
220+
* and fill it with the fences it wants to add to the object. Ownership of this
221+
* array is taken and dma_fence_put() is used on each fence on release.
222+
*
223+
* If @signal_on_any is true the fence array signals if any fence in the array
224+
* signals, otherwise it signals when all fences in the array signal.
225+
*/
226+
struct dma_fence_array *dma_fence_array_create(int num_fences,
227+
struct dma_fence **fences,
228+
u64 context, unsigned seqno,
229+
bool signal_on_any)
230+
{
231+
struct dma_fence_array *array;
232+
233+
array = dma_fence_array_alloc(num_fences);
234+
if (!array)
235+
return NULL;
236+
237+
dma_fence_array_init(array, num_fences, fences,
238+
context, seqno, signal_on_any);
205239

206240
return array;
207241
}

drivers/dma-buf/dma-heap.c

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77
*/
88

99
#include <linux/cdev.h>
10-
#include <linux/debugfs.h>
1110
#include <linux/device.h>
1211
#include <linux/dma-buf.h>
12+
#include <linux/dma-heap.h>
1313
#include <linux/err.h>
14-
#include <linux/xarray.h>
1514
#include <linux/list.h>
16-
#include <linux/slab.h>
1715
#include <linux/nospec.h>
18-
#include <linux/uaccess.h>
1916
#include <linux/syscalls.h>
20-
#include <linux/dma-heap.h>
17+
#include <linux/uaccess.h>
18+
#include <linux/xarray.h>
2119
#include <uapi/linux/dma-heap.h>
2220

2321
#define DEVNAME "dma_heap"
@@ -28,9 +26,10 @@
2826
* struct dma_heap - represents a dmabuf heap in the system
2927
* @name: used for debugging/device-node name
3028
* @ops: ops struct for this heap
31-
* @heap_devt heap device node
32-
* @list list head connecting to list of heaps
33-
* @heap_cdev heap char device
29+
* @priv: private data for this heap
30+
* @heap_devt: heap device node
31+
* @list: list head connecting to list of heaps
32+
* @heap_cdev: heap char device
3433
*
3534
* Represents a heap of memory from which buffers can be made.
3635
*/
@@ -50,8 +49,8 @@ static struct class *dma_heap_class;
5049
static DEFINE_XARRAY_ALLOC(dma_heap_minors);
5150

5251
static int dma_heap_buffer_alloc(struct dma_heap *heap, size_t len,
53-
unsigned int fd_flags,
54-
unsigned int heap_flags)
52+
u32 fd_flags,
53+
u64 heap_flags)
5554
{
5655
struct dma_buf *dmabuf;
5756
int fd;
@@ -193,20 +192,20 @@ static const struct file_operations dma_heap_fops = {
193192
};
194193

195194
/**
196-
* dma_heap_get_drvdata() - get per-subdriver data for the heap
195+
* dma_heap_get_drvdata - get per-heap driver data
197196
* @heap: DMA-Heap to retrieve private data for
198197
*
199198
* Returns:
200-
* The per-subdriver data for the heap.
199+
* The per-heap data for the heap.
201200
*/
202201
void *dma_heap_get_drvdata(struct dma_heap *heap)
203202
{
204203
return heap->priv;
205204
}
206205

207206
/**
208-
* dma_heap_get_name() - get heap name
209-
* @heap: DMA-Heap to retrieve private data for
207+
* dma_heap_get_name - get heap name
208+
* @heap: DMA-Heap to retrieve the name of
210209
*
211210
* Returns:
212211
* The char* for the heap name.
@@ -216,6 +215,10 @@ const char *dma_heap_get_name(struct dma_heap *heap)
216215
return heap->name;
217216
}
218217

218+
/**
219+
* dma_heap_add - adds a heap to dmabuf heaps
220+
* @exp_info: information needed to register this heap
221+
*/
219222
struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info)
220223
{
221224
struct dma_heap *heap, *h, *err_ret;

0 commit comments

Comments
 (0)