Sandy Huang 85087083de drm/rockchip: fb: Fix kenrel panic when cat /d/dri/0/state at kernel logo stage
when userspace cat /d/dri/0/state, the driver will try to dump gem info
throught obj->funcs->print_info(p, indent, obj), if logo gem object less
funcs init, it will appears the following error:

[   52.587405][ T2156] pc : drm_gem_print_info+0xcc/0xf8
[   52.587862][ T2156] lr : drm_gem_print_info+0xc8/0xf8
[   52.588313][ T2156] sp : ffffffc00e35ba30
[   52.588664][ T2156] x29: ffffffc00e35ba30 x28: 00000000010e0000 x27:
0000000000000000
[   52.589358][ T2156] x26: 0000000000000004 x25: ffffff80c0c57150 x24:
000000000000010e
[   52.590051][ T2156] x23: ffffffc009bcdd48 x22: ffffffc009bcdd48 x21:
ffffffc00e35bba8
[   52.590744][ T2156] x20: 0000000000000004 x19: ffffff80c5cae0d0 x18:
ffffffc00d92d080
[   52.591437][ T2156] x17: 0000000000000000 x16: 00000000000000a4 x15:
ffffffc0094a4174
[   52.592130][ T2156] x14: 0000000000000000 x13: 000000000000004e x12:
ffff0000ffffff00
[   52.592824][ T2156] x11: 0000000000000000 x10: 0000000000001000 x9 :
4f57b917247aff00
[   52.593516][ T2156] x8 : 0000000000000000 x7 : 3d646574726f706d x6 :
000000000000000a
[   52.594209][ T2156] x5 : ffffff80c5f08216 x4 : ffffffc009bbfcb5 x3 :
ffff0a00ffffff04
[   52.594902][ T2156] x2 : 0000000000000001 x1 : ffffffc009bbfcb4 x0 :
0000000000000010
[   52.595595][ T2156] Call trace:
[   52.595882][ T2156]  drm_gem_print_info+0xcc/0xf8
[   52.596301][ T2156]  drm_framebuffer_print_info+0x19c/0x2f4
[   52.596799][ T2156]  drm_atomic_plane_print_state+0xb8/0x1d0
[   52.597305][ T2156]  __drm_state_dump+0x7c/0x1a0
[   52.597714][ T2156]  drm_state_info+0x50/0x7c
[   52.598101][ T2156]  seq_read_iter+0x128/0x414
[   52.598499][ T2156]  seq_read+0x90/0xc8
[   52.598841][ T2156]  full_proxy_read+0x6c/0xf4
[   52.599240][ T2156]  vfs_read+0xe8/0x27c
[   52.599594][ T2156]  ksys_read+0x78/0xe4

before the following commit, drm_gem_print_info() function will check obj->funcs confirm is !NULL,
and then call obj->funcs->print_info, this can avoid kernel panic.

commit d693def4fd ("drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver")
https://patchwork.freedesktop.org/patch/391822/

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7236ac7f3f5475e6446546f069146a3fa0d7f2fe
2024-04-03 15:12:01 +08:00
2024-01-02 14:38:47 +08:00
2024-01-02 14:38:47 +08:00
2024-03-29 16:07:24 +08:00
2024-01-02 14:38:47 +08:00
2023-10-10 22:00:46 +02:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%