diff options
Diffstat (limited to 'drivers/gpu/drm')
| -rw-r--r-- | drivers/gpu/drm/drm_modes.c | 20 | ||||
| -rw-r--r-- | drivers/gpu/drm/tilcdc/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 04fa6f1808d1..f83f0719922e 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c | |||
| @@ -506,7 +506,7 @@ drm_gtf_mode(struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh, | |||
| 506 | } | 506 | } |
| 507 | EXPORT_SYMBOL(drm_gtf_mode); | 507 | EXPORT_SYMBOL(drm_gtf_mode); |
| 508 | 508 | ||
| 509 | #if IS_ENABLED(CONFIG_VIDEOMODE) | 509 | #ifdef CONFIG_VIDEOMODE_HELPERS |
| 510 | int drm_display_mode_from_videomode(const struct videomode *vm, | 510 | int drm_display_mode_from_videomode(const struct videomode *vm, |
| 511 | struct drm_display_mode *dmode) | 511 | struct drm_display_mode *dmode) |
| 512 | { | 512 | { |
| @@ -523,26 +523,25 @@ int drm_display_mode_from_videomode(const struct videomode *vm, | |||
| 523 | dmode->clock = vm->pixelclock / 1000; | 523 | dmode->clock = vm->pixelclock / 1000; |
| 524 | 524 | ||
| 525 | dmode->flags = 0; | 525 | dmode->flags = 0; |
| 526 | if (vm->dmt_flags & VESA_DMT_HSYNC_HIGH) | 526 | if (vm->flags & DISPLAY_FLAGS_HSYNC_HIGH) |
| 527 | dmode->flags |= DRM_MODE_FLAG_PHSYNC; | 527 | dmode->flags |= DRM_MODE_FLAG_PHSYNC; |
| 528 | else if (vm->dmt_flags & VESA_DMT_HSYNC_LOW) | 528 | else if (vm->flags & DISPLAY_FLAGS_HSYNC_LOW) |
| 529 | dmode->flags |= DRM_MODE_FLAG_NHSYNC; | 529 | dmode->flags |= DRM_MODE_FLAG_NHSYNC; |
| 530 | if (vm->dmt_flags & VESA_DMT_VSYNC_HIGH) | 530 | if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH) |
| 531 | dmode->flags |= DRM_MODE_FLAG_PVSYNC; | 531 | dmode->flags |= DRM_MODE_FLAG_PVSYNC; |
| 532 | else if (vm->dmt_flags & VESA_DMT_VSYNC_LOW) | 532 | else if (vm->flags & DISPLAY_FLAGS_VSYNC_LOW) |
| 533 | dmode->flags |= DRM_MODE_FLAG_NVSYNC; | 533 | dmode->flags |= DRM_MODE_FLAG_NVSYNC; |
| 534 | if (vm->data_flags & DISPLAY_FLAGS_INTERLACED) | 534 | if (vm->flags & DISPLAY_FLAGS_INTERLACED) |
| 535 | dmode->flags |= DRM_MODE_FLAG_INTERLACE; | 535 | dmode->flags |= DRM_MODE_FLAG_INTERLACE; |
| 536 | if (vm->data_flags & DISPLAY_FLAGS_DOUBLESCAN) | 536 | if (vm->flags & DISPLAY_FLAGS_DOUBLESCAN) |
| 537 | dmode->flags |= DRM_MODE_FLAG_DBLSCAN; | 537 | dmode->flags |= DRM_MODE_FLAG_DBLSCAN; |
| 538 | drm_mode_set_name(dmode); | 538 | drm_mode_set_name(dmode); |
| 539 | 539 | ||
| 540 | return 0; | 540 | return 0; |
| 541 | } | 541 | } |
| 542 | EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode); | 542 | EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode); |
| 543 | #endif | ||
| 544 | 543 | ||
| 545 | #if IS_ENABLED(CONFIG_OF_VIDEOMODE) | 544 | #ifdef CONFIG_OF |
| 546 | /** | 545 | /** |
| 547 | * of_get_drm_display_mode - get a drm_display_mode from devicetree | 546 | * of_get_drm_display_mode - get a drm_display_mode from devicetree |
| 548 | * @np: device_node with the timing specification | 547 | * @np: device_node with the timing specification |
| @@ -572,7 +571,8 @@ int of_get_drm_display_mode(struct device_node *np, | |||
| 572 | return 0; | 571 | return 0; |
| 573 | } | 572 | } |
| 574 | EXPORT_SYMBOL_GPL(of_get_drm_display_mode); | 573 | EXPORT_SYMBOL_GPL(of_get_drm_display_mode); |
| 575 | #endif | 574 | #endif /* CONFIG_OF */ |
| 575 | #endif /* CONFIG_VIDEOMODE_HELPERS */ | ||
| 576 | 576 | ||
| 577 | /** | 577 | /** |
| 578 | * drm_mode_set_name - set the name on a mode | 578 | * drm_mode_set_name - set the name on a mode |
diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig index d24d04013476..e461e9972455 100644 --- a/drivers/gpu/drm/tilcdc/Kconfig +++ b/drivers/gpu/drm/tilcdc/Kconfig | |||
| @@ -4,8 +4,7 @@ config DRM_TILCDC | |||
| 4 | select DRM_KMS_HELPER | 4 | select DRM_KMS_HELPER |
| 5 | select DRM_KMS_CMA_HELPER | 5 | select DRM_KMS_CMA_HELPER |
| 6 | select DRM_GEM_CMA_HELPER | 6 | select DRM_GEM_CMA_HELPER |
| 7 | select OF_VIDEOMODE | 7 | select VIDEOMODE_HELPERS |
| 8 | select OF_DISPLAY_TIMING | ||
| 9 | select BACKLIGHT_CLASS_DEVICE | 8 | select BACKLIGHT_CLASS_DEVICE |
| 10 | help | 9 | help |
| 11 | Choose this option if you have an TI SoC with LCDC display | 10 | Choose this option if you have an TI SoC with LCDC display |
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 580b74e2022b..90ee49786372 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c | |||
| @@ -173,7 +173,7 @@ static int panel_connector_get_modes(struct drm_connector *connector) | |||
| 173 | struct drm_display_mode *mode = drm_mode_create(dev); | 173 | struct drm_display_mode *mode = drm_mode_create(dev); |
| 174 | struct videomode vm; | 174 | struct videomode vm; |
| 175 | 175 | ||
| 176 | if (videomode_from_timing(timings, &vm, i)) | 176 | if (videomode_from_timings(timings, &vm, i)) |
| 177 | break; | 177 | break; |
| 178 | 178 | ||
| 179 | drm_display_mode_from_videomode(&vm, mode); | 179 | drm_display_mode_from_videomode(&vm, mode); |
