drm/mxsfb: fix pixel clock polarity
Subsystems (4)
Stefan Agner
maintainerPATCH v2 1/1 drm/mxsfb: fix pixel clock polarity
The DRM subsystem specifies the pixel clock polarity from a controllers perspective: DRM_BUS_FLAG_PIXDATA_NEGEDGE means the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge).
Also change the data enable logic to be high active by default and only change if explicitly requested via bus_flags. With that defaults are:
- Data enable: high active
- Pixel clock polarity: controller drives data on negative edge
---
Changes since v1:
- Improved comments/fixed typo
drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/mxsfb/mxsfb_crtc.c +9 -2
@@ -195,9 +195,16 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) vdctrl0 |=VDCTRL0_HSYNC_ACT_HIGH ;if (m->flags &DRM_MODE_FLAG_PVSYNC ) vdctrl0 |=VDCTRL0_VSYNC_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_DE_HIGH ) +/* Make sure Data Enable is high active by default */ +if (!(bus_flags &DRM_BUS_FLAG_DE_LOW )) vdctrl0 |=VDCTRL0_ENABLE_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_PIXDATA_NEGEDGE ) +/* +* DRM_BUS_FLAG_PIXDATA_ defines are controller centric, +* controllers VDCTRL0_DOTCLK is display centric. +* Drive on positive edge -> display samples on falling edge +* DRM_BUS_FLAG_PIXDATA_POSEDGE -> VDCTRL0_DOTCLK_ACT_FALLING +*/ +if (bus_flags &DRM_BUS_FLAG_PIXDATA_POSEDGE ) vdctrl0 |=VDCTRL0_DOTCLK_ACT_FALLING ;writel (vdctrl0, mxsfb->base +LCDC_VDCTRL0 );
Signature · 6 lines
2.10.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Stefan Agner
The DRM subsystem specifies the pixel clock polarity from a controllers perspective:
DRM_BUS_FLAG_PIXDATA_NEGEDGEmeans the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge).
Quoted 7 lines
Also change the data enable logic to be high active by default and only change if explicitly requested via
bus_flags. With that defaults are:
- Data enable: high active
- Pixel clock polarity: controller drives data on negative edgeSigned-off-by Stefan Agner <[email protected]>
Quoted 31 lines
---
Changes since v1:
- Improved comments/fixed typodrivers/gpu/drm/mxsfb/mxsfb_crtc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/mxsfb/mxsfb_crtc.c +9
-2@@ -195,9 +195,16 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) vdctrl0 |=VDCTRL0_HSYNC_ACT_HIGH ;if (m->flags &DRM_MODE_FLAG_PVSYNC ) vdctrl0 |=VDCTRL0_VSYNC_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_DE_HIGH ) +/* Make sure Data Enable is high active by default */ +if (!(bus_flags &DRM_BUS_FLAG_DE_LOW )) vdctrl0 |=VDCTRL0_ENABLE_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_PIXDATA_NEGEDGE ) +/* +* DRM_BUS_FLAG_PIXDATA_ defines are controller centric, +* controllers VDCTRL0_DOTCLK is display centric. +* Drive on positive edge -> display samples on falling edge +* DRM_BUS_FLAG_PIXDATA_POSEDGE -> VDCTRL0_DOTCLK_ACT_FALLING +*/ +if (bus_flags &DRM_BUS_FLAG_PIXDATA_POSEDGE ) vdctrl0 |=VDCTRL0_DOTCLK_ACT_FALLING ;writel (vdctrl0, mxsfb->base +LCDC_VDCTRL0 );
Signature · 2 lines
Best regards, Marek Vasut
Stefan Agner
maintainerDave, Marek,
Quoted 13 lines · Marek Vasut
Quoted 12 lines · Stefan Agner
The DRM subsystem specifies the pixel clock polarity from a controllers perspective:
DRM_BUS_FLAG_PIXDATA_NEGEDGEmeans the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge).Also change the data enable logic to be high active by default and only change if explicitly requested via
bus_flags. With that defaults are:
- Data enable: high active
- Pixel clock polarity: controller drives data on negative edge
Quoted 4 lines
Quoted 1 line
Signed-off-by Stefan Agner <[email protected]>Acked-by Marek Vasut <[email protected]>
This seems not have made into drm-next yet. Not sure what the plan is here, who will pick this up? There is also another fix on ML for the same driver ("drm: mxsfb: Fix crash when provided invalid DT bindings").
--
Stefan
Quoted 29 lines
Quoted 29 lines
---
Changes since v1:
- Improved comments/fixed typodrivers/gpu/drm/mxsfb/mxsfb_crtc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/mxsfb/mxsfb_crtc.c +9
-2@@ -195,9 +195,16 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) vdctrl0 |=VDCTRL0_HSYNC_ACT_HIGH ;if (m->flags &DRM_MODE_FLAG_PVSYNC ) vdctrl0 |=VDCTRL0_VSYNC_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_DE_HIGH ) +/* Make sure Data Enable is high active by default */ +if (!(bus_flags &DRM_BUS_FLAG_DE_LOW )) vdctrl0 |=VDCTRL0_ENABLE_ACT_HIGH ; -if (bus_flags &DRM_BUS_FLAG_PIXDATA_NEGEDGE ) +/* +* DRM_BUS_FLAG_PIXDATA_ defines are controller centric, +* controllers VDCTRL0_DOTCLK is display centric. +* Drive on positive edge -> display samples on falling edge +* DRM_BUS_FLAG_PIXDATA_POSEDGE -> VDCTRL0_DOTCLK_ACT_FALLING +*/ +if (bus_flags &DRM_BUS_FLAG_PIXDATA_POSEDGE ) vdctrl0 |=VDCTRL0_DOTCLK_ACT_FALLING ;
Quoted 2 lines
drivers/gpu/drm/mxsfb/mxsfb_crtc.c static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) · line 210
Quoted 2 lines
drivers/gpu/drm/mxsfb/mxsfb_crtc.c +0
-0writel (vdctrl0, mxsfb->base +LCDC_VDCTRL0 );
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 14 lines · Stefan Agner
Quoted 13 lines · Marek Vasut
Quoted 12 lines · Stefan Agner
The DRM subsystem specifies the pixel clock polarity from a controllers perspective:
DRM_BUS_FLAG_PIXDATA_NEGEDGEmeans the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge).Also change the data enable logic to be high active by default and only change if explicitly requested via
bus_flags. With that defaults are:
- Data enable: high active
- Pixel clock polarity: controller drives data on negative edge
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Stefan Agner <[email protected]>Acked-by Marek Vasut <[email protected]>This seems not have made into drm-next yet. Not sure what the plan is here, who will pick this up? There is also another fix on ML for the same driver ("drm: mxsfb: Fix crash when provided invalid DT bindings").
By default, driver maintainers are expected to pick up driver patches. Exception is trivial patches by newcomers, to get them on board fast (and avoid frustration when a maintainer isn't around). drm-misc and Dave by default don't pick up anything.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Marek Vasut
maintainerQuoted 20 lines · Daniel Vetter
Quoted 19 lines · Stefan Agner
Quoted 17 lines · Marek Vasut
Quoted 6 lines · Stefan Agner
The DRM subsystem specifies the pixel clock polarity from a controllers perspective:
DRM_BUS_FLAG_PIXDATA_NEGEDGEmeans the controller drives the data on pixel clocks falling edge. That is the controllers DOTCLK_POL=0 (Default is data launched at negative edge).Quoted 7 lines
Also change the data enable logic to be high active by default and only change if explicitly requested via
bus_flags. With that defaults are:
- Data enable: high active
- Pixel clock polarity: controller drives data on negative edgeSigned-off-by Stefan Agner <[email protected]>Acked-by Marek Vasut <[email protected]>
Quoted 8 lines
Quoted 3 lines
This seems not have made into drm-next yet. Not sure what the plan is here, who will pick this up? There is also another fix on ML for the same driver ("drm: mxsfb: Fix crash when provided invalid DT bindings").
By default, driver maintainers are expected to pick up driver patches. Exception is trivial patches by newcomers, to get them on board fast (and avoid frustration when a maintainer isn't around). drm-misc and Dave by default don't pick up anything.
Aha, OK.
Signature · 2 lines
Best regards, Marek Vasut