Skip to contentSkip to conversation

drm/kmb: Remove unused const and defines

PATCH In review [email protected] 1 participant 3 messages Jan 25, 2025 – Mar 3, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/kmb: Remove unused const and defines

From: "Dr. David Alan Gilbert" <[email protected]>

layer_irqs[] was added in 2020 as part of
commit 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") but isn't used.

Remove it.

It was the only user of the LCD_INT_VL0, LCD_INT_VL1, LCD_INT_GL0 and LCD_INT_GL1 defines.

Remove them.

commit c026565fe9be ("drm/kmb: Enable alpha blended second plane") added a second copy of the POSSIBLE_CRTCS define.

Remove it.

---
 drivers/gpu/drm/kmb/kmb_plane.c | 7 -------
 drivers/gpu/drm/kmb/kmb_plane.h | 5 -----
 2 files changed, 12 deletions(-)
drivers/gpu/drm/kmb/kmb_plane.c +0 -7
index 9e0562aa2bcb..5a8c7cbf27b0 100644
@@ -17,13 +17,6 @@
 #include "kmb_plane.h"
 #include "kmb_regs.h"
 
-const u32 layer_irqs[] = {
-	LCD_INT_VL0,
-	LCD_INT_VL1,
-	LCD_INT_GL0,
-	LCD_INT_GL1
-};
-
 /* Conversion (yuv->rgb) matrix from myriadx */
 static const u32 csc_coef_lcd[] = {
 	1024, 0, 1436,
drivers/gpu/drm/kmb/kmb_plane.h +0 -5
index b51144044fe8..ad8b9a67c57f 100644
@@ -25,14 +25,9 @@
 
 #define LCD_INT_GL0_ERR (LAYER2_DMA_FIFO_OVERFLOW | LAYER2_DMA_FIFO_UNDERFLOW)
 #define LCD_INT_GL1_ERR (LAYER3_DMA_FIFO_OVERFLOW | LAYER3_DMA_FIFO_UNDERFLOW)
-#define LCD_INT_VL0 (LAYER0_DMA_DONE | LAYER0_DMA_IDLE | LCD_INT_VL0_ERR)
-#define LCD_INT_VL1 (LAYER1_DMA_DONE | LAYER1_DMA_IDLE | LCD_INT_VL1_ERR)
-#define LCD_INT_GL0 (LAYER2_DMA_DONE | LAYER2_DMA_IDLE | LCD_INT_GL0_ERR)
-#define LCD_INT_GL1 (LAYER3_DMA_DONE | LAYER3_DMA_IDLE | LCD_INT_GL1_ERR)
 #define LCD_INT_DMA_ERR (LCD_INT_VL0_ERR | LCD_INT_VL1_ERR \
 		| LCD_INT_GL0_ERR | LCD_INT_GL1_ERR)
 
-#define POSSIBLE_CRTCS 1
 #define to_kmb_plane(x) container_of(x, struct kmb_plane, base_plane)
 
 #define POSSIBLE_CRTCS		1
Signature · 1 line
2.48.1
#1 lore raw

Note Edmund's address doesn't work:
--->
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

[email protected]

    host mgamail.eglb.intel.com [192.198.163.19]
    SMTP error from remote mail server after RCPT TO:<[email protected]>:
    550 #5.1.0 Address rejected.
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#2 lore raw
In reply to [email protected]
Quoted 11 lines · * [email protected] ([email protected]) wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

layer_irqs[] was added in 2020 as part of
commit 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") but isn't used.

Remove it.

It was the only user of the LCD_INT_VL0, LCD_INT_VL1, LCD_INT_GL0 and LCD_INT_GL1 defines.

Quoted 8 lines

Remove them.

commit c026565fe9be ("drm/kmb: Enable alpha blended second plane") added a second copy of the POSSIBLE_CRTCS define.

Remove it.

Hi,
Can someone please review or pick up this one please.

Thanks,

Dave

Quoted 45 lines
---
 drivers/gpu/drm/kmb/kmb_plane.c | 7 -------
 drivers/gpu/drm/kmb/kmb_plane.h | 5 -----
 2 files changed, 12 deletions(-)
drivers/gpu/drm/kmb/kmb_plane.c +0 -7
index 9e0562aa2bcb..5a8c7cbf27b0 100644
@@ -17,13 +17,6 @@
 #include "kmb_plane.h"
 #include "kmb_regs.h"
 
-const u32 layer_irqs[] = {
-	LCD_INT_VL0,
-	LCD_INT_VL1,
-	LCD_INT_GL0,
-	LCD_INT_GL1
-};
-
 /* Conversion (yuv->rgb) matrix from myriadx */
 static const u32 csc_coef_lcd[] = {
 	1024, 0, 1436,
drivers/gpu/drm/kmb/kmb_plane.h +0 -5
index b51144044fe8..ad8b9a67c57f 100644
@@ -25,14 +25,9 @@
 
 #define LCD_INT_GL0_ERR (LAYER2_DMA_FIFO_OVERFLOW | LAYER2_DMA_FIFO_UNDERFLOW)
 #define LCD_INT_GL1_ERR (LAYER3_DMA_FIFO_OVERFLOW | LAYER3_DMA_FIFO_UNDERFLOW)
-#define LCD_INT_VL0 (LAYER0_DMA_DONE | LAYER0_DMA_IDLE | LCD_INT_VL0_ERR)
-#define LCD_INT_VL1 (LAYER1_DMA_DONE | LAYER1_DMA_IDLE | LCD_INT_VL1_ERR)
-#define LCD_INT_GL0 (LAYER2_DMA_DONE | LAYER2_DMA_IDLE | LCD_INT_GL0_ERR)
-#define LCD_INT_GL1 (LAYER3_DMA_DONE | LAYER3_DMA_IDLE | LCD_INT_GL1_ERR)
 #define LCD_INT_DMA_ERR (LCD_INT_VL0_ERR | LCD_INT_VL1_ERR \
 		| LCD_INT_GL0_ERR | LCD_INT_GL1_ERR)
 
-#define POSSIBLE_CRTCS 1
 #define to_kmb_plane(x) container_of(x, struct kmb_plane, base_plane)
 
 #define POSSIBLE_CRTCS		1
Signature · 1 line
2.48.1
Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/