Skip to content

Commit 730eb31

Browse files
committed
Merge: DRM backport 9.3 from v6.3
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2502 This is main part of the DRM backport up to v6.3 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160457 Omitted-fix: dd2f0a0 - No runtime impact and not hit Signed-off-by: Mika Penttilä <mpenttil@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Jocelyn Falempe <jfalempe@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents ff54bd1 + b2d21f6 commit 730eb31

File tree

2,080 files changed

+173488
-95444
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,080 files changed

+173488
-95444
lines changed

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 = 0
12-
RHEL_DRM_SUBLEVEL = 8
11+
RHEL_DRM_PATCHLEVEL = 3
12+
RHEL_DRM_SUBLEVEL =
1313

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

drivers/dma-buf/dma-buf-sysfs-stats.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void dma_buf_sysfs_release(struct kobject *kobj)
112112
kfree(sysfs_entry);
113113
}
114114

115-
static struct kobj_type dma_buf_ktype = {
115+
static const struct kobj_type dma_buf_ktype = {
116116
.sysfs_ops = &dma_buf_stats_sysfs_ops,
117117
.release = dma_buf_sysfs_release,
118118
.default_groups = dma_buf_stats_default_groups,
@@ -132,7 +132,7 @@ void dma_buf_stats_teardown(struct dma_buf *dmabuf)
132132

133133

134134
/* Statistics files do not need to send uevents. */
135-
static int dmabuf_sysfs_uevent_filter(struct kobject *kobj)
135+
static int dmabuf_sysfs_uevent_filter(const struct kobject *kobj)
136136
{
137137
return 0;
138138
}
@@ -168,14 +168,11 @@ void dma_buf_uninit_sysfs_statistics(void)
168168
kset_unregister(dma_buf_stats_kset);
169169
}
170170

171-
int dma_buf_stats_setup(struct dma_buf *dmabuf)
171+
int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file)
172172
{
173173
struct dma_buf_sysfs_entry *sysfs_entry;
174174
int ret;
175175

176-
if (!dmabuf || !dmabuf->file)
177-
return -EINVAL;
178-
179176
if (!dmabuf->exp_name) {
180177
pr_err("exporter name must not be empty if stats needed\n");
181178
return -EINVAL;
@@ -192,7 +189,7 @@ int dma_buf_stats_setup(struct dma_buf *dmabuf)
192189

193190
/* create the directory for buffer stats */
194191
ret = kobject_init_and_add(&sysfs_entry->kobj, &dma_buf_ktype, NULL,
195-
"%lu", file_inode(dmabuf->file)->i_ino);
192+
"%lu", file_inode(file)->i_ino);
196193
if (ret)
197194
goto err_sysfs_dmabuf;
198195

drivers/dma-buf/dma-buf-sysfs-stats.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
int dma_buf_init_sysfs_statistics(void);
1414
void dma_buf_uninit_sysfs_statistics(void);
1515

16-
int dma_buf_stats_setup(struct dma_buf *dmabuf);
16+
int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file);
1717

1818
void dma_buf_stats_teardown(struct dma_buf *dmabuf);
1919
#else
@@ -25,7 +25,7 @@ static inline int dma_buf_init_sysfs_statistics(void)
2525

2626
static inline void dma_buf_uninit_sysfs_statistics(void) {}
2727

28-
static inline int dma_buf_stats_setup(struct dma_buf *dmabuf)
28+
static inline int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file)
2929
{
3030
return 0;
3131
}

0 commit comments

Comments
 (0)