0005-ioctls-drm-check-i810-mga-r128-and-savage-support-44.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. From 6823bacb3c2564bff5da3175c574fd6a6af4d8b2 Mon Sep 17 00:00:00 2001
  2. From: chuhu <chuhu@redhat.com>
  3. Date: Sat, 1 Jul 2023 01:02:37 +0800
  4. Subject: [PATCH] ioctls/drm: check i810,mga,r128 and savage support (#44)
  5. kernel v6.3-rc1 removed some drm drivers, so add the extra check to make
  6. the compile succeed.
  7. 7872bc2cb13e drm: Remove the obsolete driver-savage
  8. 28483b8666bf drm: Remove the obsolete driver-r128
  9. 96ed7db55bef drm: Remove the obsolete driver-mga
  10. cab18866fead drm: Remove the obsolete driver-i810
  11. Signed-off-by: Chunyu Hu <chuhu@redhat.com>
  12. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  13. Upstream: https://github.com/kernelslacker/trinity/commit/6823bacb3c2564bff5da3175c574fd6a6af4d8b2
  14. ---
  15. configure | 4 ++++
  16. ioctls/drm.c | 14 ++++++++++++++
  17. 2 files changed, 18 insertions(+)
  18. diff --git a/configure b/configure
  19. index 944c8cf7..bbaf9afc 100755
  20. --- a/configure
  21. +++ b/configure
  22. @@ -320,6 +320,10 @@ check_header linux/irda.h USE_IRDA
  23. check_header linux/rds.h USE_RDS
  24. check_header linux/vfio.h USE_VFIO
  25. check_header drm/drm.h USE_DRM
  26. +check_header drm/i810_drm.h USE_DRM_I810
  27. +check_header drm/mga_drm.h USE_DRM_MGA
  28. +check_header drm/r128_drm.h USE_DRM_R128
  29. +check_header drm/savage_drm.h USE_DRM_SAVAGE
  30. check_header drm/exynos_drm.h USE_DRM_EXYNOS
  31. check_header sound/compress_offload.h USE_SNDDRV_COMPRESS_OFFLOAD
  32. check_header linux/kvm.h USE_KVM
  33. diff --git a/ioctls/drm.c b/ioctls/drm.c
  34. index 81ed3682..a07a8436 100644
  35. --- a/ioctls/drm.c
  36. +++ b/ioctls/drm.c
  37. @@ -8,13 +8,21 @@
  38. #ifdef USE_DRM_EXYNOS
  39. #include <drm/exynos_drm.h>
  40. #endif
  41. +#ifdef USE_DRM_I810
  42. #include <drm/i810_drm.h>
  43. +#endif
  44. #include <drm/i915_drm.h>
  45. +#ifdef USE_DRM_MGA
  46. #include <drm/mga_drm.h>
  47. +#endif
  48. #include <drm/nouveau_drm.h>
  49. +#ifdef USE_DRM_R128
  50. #include <drm/r128_drm.h>
  51. +#endif
  52. #include <drm/radeon_drm.h>
  53. +#ifdef USE_DRM_SAVAGE
  54. #include <drm/savage_drm.h>
  55. +#endif
  56. #include "ioctls.h"
  57. #include "utils.h"
  58. @@ -293,6 +301,7 @@ static const struct ioctl drm_ioctls[] = {
  59. #endif
  60. #endif
  61. +#ifdef USE_DRM_I810
  62. /* i810_drm.h */
  63. IOCTL(DRM_IOCTL_I810_INIT),
  64. IOCTL(DRM_IOCTL_I810_VERTEX),
  65. @@ -309,6 +318,7 @@ static const struct ioctl drm_ioctls[] = {
  66. IOCTL(DRM_IOCTL_I810_MC),
  67. IOCTL(DRM_IOCTL_I810_RSTATUS),
  68. IOCTL(DRM_IOCTL_I810_FLIP),
  69. +#endif
  70. /* i915_drm.h */
  71. IOCTL(DRM_IOCTL_I915_INIT),
  72. @@ -378,6 +388,7 @@ static const struct ioctl drm_ioctls[] = {
  73. IOCTL(DRM_IOCTL_I915_REG_READ),
  74. #endif
  75. +#ifdef USE_DRM_MGA
  76. /* mga_drm.h */
  77. IOCTL(DRM_IOCTL_MGA_INIT),
  78. IOCTL(DRM_IOCTL_MGA_FLUSH),
  79. @@ -401,6 +412,7 @@ static const struct ioctl drm_ioctls[] = {
  80. IOCTL(DRM_IOCTL_NOUVEAU_GROBJ_ALLOC),
  81. IOCTL(DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC),
  82. IOCTL(DRM_IOCTL_NOUVEAU_GPUOBJ_FREE),
  83. +#endif
  84. #ifdef DRM_IOCTL_NOUVEAU_GEM_NEW
  85. IOCTL(DRM_IOCTL_NOUVEAU_GEM_NEW),
  86. #endif
  87. @@ -417,6 +429,7 @@ static const struct ioctl drm_ioctls[] = {
  88. IOCTL(DRM_IOCTL_NOUVEAU_GEM_INFO),
  89. #endif
  90. +#ifdef USE_DRM_R128
  91. /* r128_drm.h */
  92. IOCTL(DRM_IOCTL_R128_INIT),
  93. IOCTL(DRM_IOCTL_R128_CCE_START),
  94. @@ -435,6 +448,7 @@ static const struct ioctl drm_ioctls[] = {
  95. IOCTL(DRM_IOCTL_R128_FULLSCREEN),
  96. IOCTL(DRM_IOCTL_R128_GETPARAM),
  97. IOCTL(DRM_IOCTL_R128_FLIP),
  98. +#endif
  99. /* radeon_drm.h */
  100. IOCTL(DRM_IOCTL_RADEON_CP_INIT),
  101. --
  102. 2.39.2