hdl-util / hdmi

Send video/audio over HDMI on an FPGA
https://purisa.me/blog/hdmi-released/
Other
1.04k stars 111 forks source link

DVI compatibility #2

Closed LMN128 closed 4 years ago

LMN128 commented 4 years ago

Hi, i tested project with some older DVI monitors and seems there is a small incompatibility. I tried VIDEO_ID_CODE=1 and DVI_OUTPUT =1. E.g LG M1921TA monitor doesn't display an image. Original Mike Field's project works well on this monitor.

sameer commented 4 years ago

Thank you for bringing this to my attention, I'll have time to investigate hopefully later today or tomorrow. If you notice any other problems please open issues for them in the meanwhile!

-------- Original Message -------- On Nov 11, 2019, 03:42, Jan Kucera wrote:

Hi, i tested project with some older DVI monitors and seems there is a small incompatibility. I tried VIDEO_ID_CODE=1 and DVI_OUTPUT =1. E.g LG M1921TA monitor doesn't display an image. Original Mike Field's project works well on this monitor.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sameer commented 4 years ago

Hi Jan, please give the updated code a try when you have some time.

LMN128 commented 4 years ago

Hi Sameer, I updated the code and unfortunately it still doesn't work with LG M1921TA monitor.

LMN128 commented 4 years ago

Hi Sameer. I tried another monitor (Philips 190P6) with VIDEO_ID_CODE=1, DVI_OUTPUT =1, Pixel clock 25.175MHz (640x480 resolution). As LG M1921TA doesn't work as well.

sameer commented 4 years ago

Hi Jan, sorry for the delay. I should be able to test things in ~5-6 hours when I get home.

-------- Original Message -------- On Nov 15, 2019, 05:23, Jan Kucera wrote:

Hi Sameer. I tried another monitor (Philips 190P6) with VIDEO_ID_CODE=1, DVI_OUTPUT =1, Pixel clock 25.175MHz (640x480 resolution). As LG M1921TA doesn't work as well.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

sameer commented 4 years ago

Hi Jan, looks like I missed disabling the video guard band in DVI mode. I've pushed changes to fix that oversight.

I've checked that it works with an HDMI cable on an LG 4k monitor model # 24UD58-B. If it still doesn't work: are you using an HDMI to DVI adapter, or an HDMI cable directly?

LMN128 commented 4 years ago

Hi Sameer, i use HDMI/DVI adapter or HDMI2DVI cable. I tested it again with fresh code related to disable video guard and still doesn't work. These monitors are rather older and have only DVI input. But, i compared Mike's project with yours and i have noticed a difference in blanking coding in TDMS source code. I tried to change it and monitors start working. Check and try this please in your code

// See Section 5.4.2 wire [9:0] control_coding = control_data == 2'b00 ? 10'b1101010100 : control_data == 2'b01 ? 10'b0010101011 : control_data == 2'b10 ? 10'b0101010100 : 10'b0101010100 ; (use this :10'b1010101011 instead of last value for control_data == 2'b11)

sameer commented 4 years ago

You're right, I must've copied that line incorrectly from the HDMI spec. Thanks for catching this!

The 2'b11 mode is only active when hsync and vsync are high. Since you were using VIDEO_ID_CODE = 1, this happens quite a lot (whenever pixel y > 2 && !(15 < pixel x < 111)). I've been using VIDEO_ID_CODE = 3 where it happens much less often, so that might explain why you saw the issue and I didn't.

I'll check the rest of the codes against the spec to make sure there aren't any others I might've copied incorrectly.

LMN128 commented 4 years ago

Hi Sameer, thanks a lot. Everything works well now. I tested another modes 17,18 and 19 too. If you want you can add it to your project. There are parameters: 17, 18: begin frame_width = 864; frame_height = 625; screen_width = 720; screen_height = 576; end 19: begin frame_width = 1980; frame_height = 750; screen_width = 1280; screen_height = 720; end ..... 17, 18: begin hsync <= ~(cx > 11 && cx <= 11 + 64); vsync <= ~(cy < 5); end 19: begin hsync <= cx > 439 && cx <= 439 + 40; vsync <= cy < 5; end

sameer commented 4 years ago

Cool, I'll add these.