@@ -419,7 +419,7 @@ static void ingenic_drm_plane_enable(struct ingenic_drm *priv,
419
419
unsigned int en_bit ;
420
420
421
421
if (priv -> soc_info -> has_osd ) {
422
- if (plane -> type == DRM_PLANE_TYPE_PRIMARY )
422
+ if (plane != & priv -> f0 )
423
423
en_bit = JZ_LCD_OSDC_F1EN ;
424
424
else
425
425
en_bit = JZ_LCD_OSDC_F0EN ;
@@ -434,7 +434,7 @@ void ingenic_drm_plane_disable(struct device *dev, struct drm_plane *plane)
434
434
unsigned int en_bit ;
435
435
436
436
if (priv -> soc_info -> has_osd ) {
437
- if (plane -> type == DRM_PLANE_TYPE_PRIMARY )
437
+ if (plane != & priv -> f0 )
438
438
en_bit = JZ_LCD_OSDC_F1EN ;
439
439
else
440
440
en_bit = JZ_LCD_OSDC_F0EN ;
@@ -461,8 +461,7 @@ void ingenic_drm_plane_config(struct device *dev,
461
461
462
462
ingenic_drm_plane_enable (priv , plane );
463
463
464
- if (priv -> soc_info -> has_osd &&
465
- plane -> type == DRM_PLANE_TYPE_PRIMARY ) {
464
+ if (priv -> soc_info -> has_osd && plane != & priv -> f0 ) {
466
465
switch (fourcc ) {
467
466
case DRM_FORMAT_XRGB1555 :
468
467
ctrl |= JZ_LCD_OSDCTRL_RGB555 ;
@@ -510,7 +509,7 @@ void ingenic_drm_plane_config(struct device *dev,
510
509
}
511
510
512
511
if (priv -> soc_info -> has_osd ) {
513
- if (plane -> type == DRM_PLANE_TYPE_PRIMARY ) {
512
+ if (plane != & priv -> f0 ) {
514
513
xy_reg = JZ_REG_LCD_XYP1 ;
515
514
size_reg = JZ_REG_LCD_SIZE1 ;
516
515
} else {
@@ -561,7 +560,7 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
561
560
height = newstate -> src_h >> 16 ;
562
561
cpp = newstate -> fb -> format -> cpp [0 ];
563
562
564
- if (!priv -> soc_info -> has_osd || plane -> type == DRM_PLANE_TYPE_OVERLAY )
563
+ if (!priv -> soc_info -> has_osd || plane == & priv -> f0 )
565
564
hwdesc = & priv -> dma_hwdescs -> hwdesc_f0 ;
566
565
else
567
566
hwdesc = & priv -> dma_hwdescs -> hwdesc_f1 ;
0 commit comments