Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/atmel-hlcdc: use drm_crtc_mask()

Prefer using the drm_crtc_mask() helper instead of a raw value. It
involves reordering components initialization as we need a valid crtc.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Link: https://patch.msgid.link/20251218-lcd_cleanup_mainline-v2-4-df837aba878f@microchip.com
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>

authored by

Ludovic Desroches and committed by
Manikandan Muralidharan
07972c07 227ef8cf

+9 -7
+6 -6
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
··· 723 723 724 724 drm_mode_config_init(dev); 725 725 726 - ret = atmel_hlcdc_create_outputs(dev); 727 - if (ret) { 728 - drm_err(dev, "failed to create HLCDC outputs: %d\n", ret); 729 - return ret; 730 - } 731 - 732 726 ret = atmel_hlcdc_create_planes(dev); 733 727 if (ret) { 734 728 drm_err(dev, "failed to create planes: %d\n", ret); ··· 732 738 ret = atmel_hlcdc_crtc_create(dev); 733 739 if (ret) { 734 740 drm_err(dev, "failed to create crtc\n"); 741 + return ret; 742 + } 743 + 744 + ret = atmel_hlcdc_create_outputs(dev); 745 + if (ret) { 746 + drm_err(dev, "failed to create HLCDC outputs: %d\n", ret); 735 747 return ret; 736 748 } 737 749
+3 -1
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
··· 71 71 struct device_node *ep; 72 72 struct drm_panel *panel; 73 73 struct drm_bridge *bridge; 74 + struct atmel_hlcdc_dc *dc = dev->dev_private; 75 + struct drm_crtc *crtc = dc->crtc; 74 76 int ret; 75 77 76 78 ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint, ··· 97 95 } 98 96 99 97 100 - output->encoder.possible_crtcs = 0x1; 101 98 102 99 if (panel) { 103 100 bridge = drm_panel_bridge_add_typed(panel, ··· 104 103 if (IS_ERR(bridge)) 105 104 return PTR_ERR(bridge); 106 105 } 106 + output->encoder.possible_crtcs = drm_crtc_mask(crtc); 107 107 108 108 if (bridge) { 109 109 ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);