I am afraid that I do not understand your point.
Adding #include <drm/drm_framebuffer.h>
to kernel/nvidia-drm/nvidia-drm-helper.h
was proposed by the Nvidia developers themselves, and I am sure they understand what they are doing
Update: As expected, the driver compiles and works flawlessly with #include <drm/drm_framebuffer.h>
in kernel/nvidia-drm/nvidia-drm-helper.h
as per the following patch:
--- a/kernel/nvidia-drm/nvidia-drm-helper.h 2022-08-26 11:42:33.152047728 +0200
+++ b/kernel/nvidia-drm/nvidia-drm-helper.h 2022-08-26 11:42:51.741615701 +0200
@@ -108,6 +108,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <drm/drm_crtc.h>
+#include <drm/drm_framebuffer.h>
#if defined(drm_for_each_plane)
#define nv_drm_for_each_plane(plane, dev) \
As for an explanation for those who are interested what is going on:
Per https://github.com/torvalds/linux/commit/720cf96d8fecde29b72e1101f8a567a0ce99594f , #include <drm/drm_framebuffer.h>
was removed from <drm/drm_crtc.h>
in kernels >= 6.0 because there was no need for that include in <drm/drm_crtc.h>
from kernel developer perspective.
Hence, we now have to include it separately in case it is needed (as for our Nvidia driver). Obviously, the best place to add that separate #include <drm/drm_framebuffer.h>
is alongside <drm/drm_crtc.h>
in kernel/nvidia-drm/nvidia-drm-helper.h
.