* [PATCH] drm/amd/display: add stub for crtc_debugfs_init()
@ 2022-06-14 15:57 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-06-14 15:57 UTC (permalink / raw)
To: dri-devel
Cc: Randy Dunlap, Pan, Xinhui, patches, amd-gfx, Wayne Lin,
Alex Deucher, Christian König
Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
stub function for crtc_debugfs_init().
Eliminates this build error:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
crtc_debugfs_init(crtc);
^~~~~~~~~~~~~~~~~
amdgpu_debugfs_init
Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -57,9 +57,7 @@
#include "amdgpu_dm_irq.h"
#include "dm_helpers.h"
#include "amdgpu_dm_mst_types.h"
-#if defined(CONFIG_DEBUG_FS)
#include "amdgpu_dm_debugfs.h"
-#endif
#include "amdgpu_dm_psr.h"
#include "ivsrcid/ivsrcid_vislands30.h"
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
@@ -31,6 +31,12 @@
void connector_debugfs_init(struct amdgpu_dm_connector *connector);
void dtn_debugfs_init(struct amdgpu_device *adev);
+
+#ifdef CONFIG_DEBUG_FS
void crtc_debugfs_init(struct drm_crtc *crtc);
+#else
+static inline void crtc_debugfs_init(struct drm_crtc *crtc)
+{}
+#endif
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm/amd/display: add stub for crtc_debugfs_init()
@ 2022-06-14 15:57 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-06-14 15:57 UTC (permalink / raw)
To: dri-devel
Cc: patches, Randy Dunlap, Wayne Lin, Alex Deucher,
Christian König, Pan, Xinhui, amd-gfx
Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
stub function for crtc_debugfs_init().
Eliminates this build error:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:
../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
crtc_debugfs_init(crtc);
^~~~~~~~~~~~~~~~~
amdgpu_debugfs_init
Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -57,9 +57,7 @@
#include "amdgpu_dm_irq.h"
#include "dm_helpers.h"
#include "amdgpu_dm_mst_types.h"
-#if defined(CONFIG_DEBUG_FS)
#include "amdgpu_dm_debugfs.h"
-#endif
#include "amdgpu_dm_psr.h"
#include "ivsrcid/ivsrcid_vislands30.h"
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
@@ -31,6 +31,12 @@
void connector_debugfs_init(struct amdgpu_dm_connector *connector);
void dtn_debugfs_init(struct amdgpu_device *adev);
+
+#ifdef CONFIG_DEBUG_FS
void crtc_debugfs_init(struct drm_crtc *crtc);
+#else
+static inline void crtc_debugfs_init(struct drm_crtc *crtc)
+{}
+#endif
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()
2022-06-14 15:57 ` Randy Dunlap
(?)
@ 2022-06-14 17:45 ` Harry Wentland
2022-06-14 17:53 ` Randy Dunlap
-1 siblings, 1 reply; 4+ messages in thread
From: Harry Wentland @ 2022-06-14 17:45 UTC (permalink / raw)
To: Randy Dunlap, dri-devel
Cc: Pan, Xinhui, patches, amd-gfx, Wayne Lin, Alex Deucher,
Christian König
On 2022-06-14 11:57, Randy Dunlap wrote:
> Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
> stub function for crtc_debugfs_init().
>
> Eliminates this build error:
>
> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:
> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
> crtc_debugfs_init(crtc);
> ^~~~~~~~~~~~~~~~~
> amdgpu_debugfs_init
>
> Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
That whole patch and the whole secure display feature depend on debugfs.
It should never try building without CONFIG_DEBUG_FS.
See drivers/gpu/drm/amd/display/Kconfig:
> config DRM_AMD_SECURE_DISPLAY
> bool "Enable secure display support"
> default n
> depends on DEBUG_FS
> depends on DRM_AMD_DC_DCN
> help
> Choose this option if you want to
> support secure display
>
> This option enables the calculation
> of crc of specific region via debugfs.
> Cooperate with specific DMCU FW.
amdgpu_dm_crtc_late_register is guarded by CONIG_DRM_AMD_SECURE_DISPLAY.
Harry
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Wayne Lin <Wayne.Lin@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -57,9 +57,7 @@
> #include "amdgpu_dm_irq.h"
> #include "dm_helpers.h"
> #include "amdgpu_dm_mst_types.h"
> -#if defined(CONFIG_DEBUG_FS)
> #include "amdgpu_dm_debugfs.h"
> -#endif
> #include "amdgpu_dm_psr.h"
>
> #include "ivsrcid/ivsrcid_vislands30.h"
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
> @@ -31,6 +31,12 @@
>
> void connector_debugfs_init(struct amdgpu_dm_connector *connector);
> void dtn_debugfs_init(struct amdgpu_device *adev);
> +
> +#ifdef CONFIG_DEBUG_FS
> void crtc_debugfs_init(struct drm_crtc *crtc);
> +#else
> +static inline void crtc_debugfs_init(struct drm_crtc *crtc)
> +{}
> +#endif
>
> #endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()
2022-06-14 17:45 ` Harry Wentland
@ 2022-06-14 17:53 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2022-06-14 17:53 UTC (permalink / raw)
To: Harry Wentland, dri-devel
Cc: Pan, Xinhui, patches, amd-gfx, Wayne Lin, Alex Deucher,
Christian König
On 6/14/22 10:45, Harry Wentland wrote:
> On 2022-06-14 11:57, Randy Dunlap wrote:
>> Fix build error when CONFIG_DEBUG_FS is not enabled by adding a
>> stub function for crtc_debugfs_init().
>>
>> Eliminates this build error:
>>
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:
>> ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6599:2: error: implicit declaration of function ‘crtc_debugfs_init’; did you mean ‘amdgpu_debugfs_init’? [-Werror=implicit-function-declaration]
>> crtc_debugfs_init(crtc);
>> ^~~~~~~~~~~~~~~~~
>> amdgpu_debugfs_init
>>
>> Fixes: 86bc22191892 ("drm/amd/display: Support crc on specific region")
>
> That whole patch and the whole secure display feature depend on debugfs.
> It should never try building without CONFIG_DEBUG_FS.
Hi Harry,
Well, it's clearly possible to have this build error, so something needs
to be fixed somewhere.
> See drivers/gpu/drm/amd/display/Kconfig:
>
>> config DRM_AMD_SECURE_DISPLAY
>> bool "Enable secure display support"
>> default n
>> depends on DEBUG_FS
>> depends on DRM_AMD_DC_DCN
>> help
>> Choose this option if you want to
>> support secure display
>>
>> This option enables the calculation
>> of crc of specific region via debugfs.
>> Cooperate with specific DMCU FW.
>
> amdgpu_dm_crtc_late_register is guarded by CONIG_DRM_AMD_SECURE_DISPLAY.
>
> Harry
>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Wayne Lin <Wayne.Lin@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
>> Cc: amd-gfx@lists.freedesktop.org
>> Cc: dri-devel@lists.freedesktop.org
>> ---
>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
>> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 6 ++++++
>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -57,9 +57,7 @@
>> #include "amdgpu_dm_irq.h"
>> #include "dm_helpers.h"
>> #include "amdgpu_dm_mst_types.h"
>> -#if defined(CONFIG_DEBUG_FS)
>> #include "amdgpu_dm_debugfs.h"
>> -#endif
>> #include "amdgpu_dm_psr.h"
>>
>> #include "ivsrcid/ivsrcid_vislands30.h"
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h
>> @@ -31,6 +31,12 @@
>>
>> void connector_debugfs_init(struct amdgpu_dm_connector *connector);
>> void dtn_debugfs_init(struct amdgpu_device *adev);
>> +
>> +#ifdef CONFIG_DEBUG_FS
>> void crtc_debugfs_init(struct drm_crtc *crtc);
>> +#else
>> +static inline void crtc_debugfs_init(struct drm_crtc *crtc)
>> +{}
>> +#endif
>>
>> #endif
>
thanks.
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-14 17:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 15:57 [PATCH] drm/amd/display: add stub for crtc_debugfs_init() Randy Dunlap
2022-06-14 15:57 ` Randy Dunlap
2022-06-14 17:45 ` Harry Wentland
2022-06-14 17:53 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.