cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Scholar
Scholar
314 Views
Registered: ‎10-21-2015

pixel clock setting in xlnx_vtc bridge module

Jump to solution

Hi

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpu/drm/xlnx/xlnx_vtc.c#L190

I know that xlnx_vtc bridge module sets video timing in xlnx_vtc_set_timing function.

But I can't find pixel clock setting in the function.

I think the function should include the following to set pixel clock

	clk_disable_unprepare(vtc->vid_clk);
	ret = clk_set_rate(vtc->vid_clk, vm->pixelclock);
	if (ret) {
		dev_err(vtc->dev, "failed to set a pixel clock %d\n", ret);
		return ret;
	}
	ret = clk_prepare_enable(vtc->vid_clk);
	if (ret) {
		dev_err(vtc->dev, "unable to enable video clk %d\n", ret);
return ret; }

 Is my modification correct?

Tags (1)
0 Kudos
Reply
1 Solution

Accepted Solutions
Scholar
Scholar
185 Views
Registered: ‎10-21-2015

Hi

VTC driver need to set pixel clock for  dynamic video timing generation.

 As clock consumer, VTC can request  the pixel clock setting  to clock provider(generator) using clk_set_rate function

Anyway, I confirmed my patch works well with project at

https://forums.xilinx.com/t5/Video-and-Audio/Bug-report-on-DRM-CRTC-DMA-engine-driver/m-p/1141378/highlight/true#M33935

View solution in original post

0 Kudos
Reply
2 Replies
Moderator
Moderator
212 Views
Registered: ‎11-09-2015

Hi @hokim 

Why did you had to set this? Did you had an issue without it?

The VTC IP itself does not have any register to set the pixel clock. This will be generated outside. I guess this is the reason why this is not included in the driver.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Reply
Scholar
Scholar
186 Views
Registered: ‎10-21-2015

Hi

VTC driver need to set pixel clock for  dynamic video timing generation.

 As clock consumer, VTC can request  the pixel clock setting  to clock provider(generator) using clk_set_rate function

Anyway, I confirmed my patch works well with project at

https://forums.xilinx.com/t5/Video-and-Audio/Bug-report-on-DRM-CRTC-DMA-engine-driver/m-p/1141378/highlight/true#M33935

View solution in original post

0 Kudos
Reply