Skip to content

Commit 89e7ffd

Browse files
committed
Merge tag 'drm-misc-fixes-2021-07-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Short summary of fixes pull: * panel: Fix bpc for ytc700tlag_05_201c * ttm: debugfs init fixes Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 792ca7e + 8ee18e7 commit 89e7ffd

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

drivers/gpu/drm/panel/panel-simple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4166,7 +4166,7 @@ static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_mode
41664166
static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
41674167
.modes = &yes_optoelectronics_ytc700tlag_05_201c_mode,
41684168
.num_modes = 1,
4169-
.bpc = 6,
4169+
.bpc = 8,
41704170
.size = {
41714171
.width = 154,
41724172
.height = 90,

drivers/gpu/drm/ttm/ttm_device.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ static unsigned ttm_glob_use_count;
4444
struct ttm_global ttm_glob;
4545
EXPORT_SYMBOL(ttm_glob);
4646

47+
struct dentry *ttm_debugfs_root;
48+
4749
static void ttm_global_release(void)
4850
{
4951
struct ttm_global *glob = &ttm_glob;
@@ -53,6 +55,7 @@ static void ttm_global_release(void)
5355
goto out;
5456

5557
ttm_pool_mgr_fini();
58+
debugfs_remove(ttm_debugfs_root);
5659

5760
__free_page(glob->dummy_read_page);
5861
memset(glob, 0, sizeof(*glob));
@@ -73,6 +76,13 @@ static int ttm_global_init(void)
7376

7477
si_meminfo(&si);
7578

79+
ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
80+
if (IS_ERR(ttm_debugfs_root)) {
81+
ret = PTR_ERR(ttm_debugfs_root);
82+
ttm_debugfs_root = NULL;
83+
goto out;
84+
}
85+
7686
/* Limit the number of pages in the pool to about 50% of the total
7787
* system memory.
7888
*/
@@ -100,6 +110,8 @@ static int ttm_global_init(void)
100110
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
101111
&glob->bo_count);
102112
out:
113+
if (ret && ttm_debugfs_root)
114+
debugfs_remove(ttm_debugfs_root);
103115
if (ret)
104116
--ttm_glob_use_count;
105117
mutex_unlock(&ttm_global_mutex);

drivers/gpu/drm/ttm/ttm_module.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,6 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
7272
return tmp;
7373
}
7474

75-
struct dentry *ttm_debugfs_root;
76-
77-
static int __init ttm_init(void)
78-
{
79-
ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
80-
return 0;
81-
}
82-
83-
static void __exit ttm_exit(void)
84-
{
85-
debugfs_remove(ttm_debugfs_root);
86-
}
87-
88-
module_init(ttm_init);
89-
module_exit(ttm_exit);
90-
9175
MODULE_AUTHOR("Thomas Hellstrom, Jerome Glisse");
9276
MODULE_DESCRIPTION("TTM memory manager subsystem (for DRM device)");
9377
MODULE_LICENSE("GPL and additional rights");

0 commit comments

Comments
 (0)