Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

800x480 resolution support #13

Closed
klogg opened this issue Feb 7, 2018 · 15 comments
Closed

800x480 resolution support #13

klogg opened this issue Feb 7, 2018 · 15 comments

Comments

@klogg
Copy link

klogg commented Feb 7, 2018

Any chance to get values for big_table_<24,16,8>bit_r<0,1> resolution_entry structures that support 800x480 displays? I'd like to connect standard Raspberry Pi HDMI display

EDIT some more information below

Based on EDID information from monitor

Looks like i2c was successful. Have a good day.
Checksum Correct
Section "Monitor"
	Identifier " 
                     @"
	ModelName " 
                    @"
	VendorName "ADA"
	# Monitor Manufactured week 1 of 2007
	# EDID version 1.3
	# Digital Display
	DisplaySize 150 100
	Gamma 1.00
	Option "DPMS" "false"
	Modeline 	"Mode 0" 32.00 800 840 888 928 480 493 496 525 -hsync -vsync 
EndSection

I have built table with display values:

  h v
res 800 480
front 40 13
sync 48 3
back 40 29
total 928 525

and filled register values in the 'big_table':

  resolution total  reg
h_sync_reg_1 0x0320 0x03A0 0x032003A0
v_sync_reg_1 0x01E0 0x020D 0x01E0020D
  sync sync+back+1  reg
h_sync_reg_2 0x30 0x59 0x00300059
v_sync_reg_2 0x03 0x21 0x02130021

From the code it seems that in addition to these registers driver also sets bulk_asic_pll register. Checking the big_table it seems that this register configures pll for pixel clock (32MHz according to EDID) and has at least 3 groups of fields (MSB to LSB):

  • 12-22: clock multiplier
  • 6-12: clock base, BIT2 is baseclk/8, BIT3 is baseclk/16
  • 0-5: clock divisor

With 10MHz XTAL I have have value of 0x00100105 for pll register (32MHz = 10MHz / 8 * 128 / 5)

Based on the data above I have created an extra line for the big_table, but right now it still does not work and I am a bit puzzled why. Also I am wondering why driver does not use EDIDs properly? BTW, the device works perfectly (well, except known issue with flickering) with this monitor with Windows 10...

@ulli-kroll
Copy link

I if wonder why you cant see no desktop ...
this is right, there is currently no DRM support
please read here
#12

@klogg
Copy link
Author

klogg commented Feb 16, 2018

@ulli-kroll yeah, I know about the DRM and I saw your "testing" branch (BTW, impressive work! hope you did not abandon it yet 😃) My problem is different - somehow driver with params I have created still outputs testing sample image incorrectly: it gets displayed on the screen but seems like something wrong with colors or whatever, I had no time to analyze yet. I plan to switch to your codebase, it is much more clean than the original which seem to be stalled.

@ulli-kroll
Copy link

With sample you the code in samplle/, right ?

Try do this with my testing branch, I've changed the USB part here. Some controllers may not happy with the scatter/gather approach in the driver especially my APU/APU2 devices form PC Engines I use for testing, some AMD Embedded SoC device.

The testing branch is used to check for some corner cases of the device, i.e. with the compression code, which can not work due some timing restrictions in the device and/or host. I've tested this barely with some bitmak (re)mapping, I've got about 100% cpu on one core with only 1280*1024.

So it's really needed to setup some shadow buffer an "stream" this to the device

@klogg
Copy link
Author

klogg commented Feb 20, 2018

With sample you the code in sample, right ?

Yep

Try do this with my testing branch

Already did rebase, will try later. Also removing the whole "big_table" crap.

So it's really needed to setup some shadow buffer an "stream" this to the device

Did you check latest changes in DRM/KMS subsystem? I think it must be much easier to create and test DRM drivers now, I think we can try it.

@ulli-kroll
Copy link

I have a working DRM driver, but currently with no data transfer to the device. (*)
And this is specific to the device.
Depending of the plane layout some conversion is needed.
i.e.
on DRM with RGB 8 Bit (with 32 bits per pixel) to 8 bit/24 RGB windows bitmap layout.
but this is not enabled/uses yet.

Currently all I want to do, is send some generated picture data to the device to test the limitations in the area.

(*)
for this I need the shadow buffer.

@klogg
Copy link
Author

klogg commented Feb 22, 2018

@ulli-kroll do you have the DRM driver published somewhere?

@prusswan
Copy link

For the record, the kernel source and test program is currently working on Ubuntu 18.04 Alpha 2 (linux kernel 4.13). Is there some similar driver that can be adapted to work with it? I remember there is a single usb2vga device that works on Ubuntu.

@ulli-kroll
Copy link

@klogg
As I said, I have no data transfer to the device, my big problem is memory.

@prusswan

latest kernel for me is v4.14.x due some restriction in wireless work.
for DRM this may
drivers/gpu/drm/udl/udl.ko
but this is DISPLAYLINK

some question form my side for @prusswan
which resolution
if the picture is flickering ?

@prusswan
Copy link

prusswan commented Feb 24, 2018

There were 3 resolutions detected (I will update when I have access to the machine again), shown using the _0 images since they are all flipped across the middle. No flickering...just display of static images.

1920x1080 and 1280x1024 are showing the _0 bmp files.
1024x768 is showing red/green/blue/white horizontal bars (the pattern repeats)

@ulli-kroll
Copy link

1920x1080 and 1280x1024 are showing the _0 bmp files.

hmm,
which output HDMI/DVI/VGA
also which CPU and/or North/Southbridge.
I get only 1280x1024 with the modified driver.

@prusswan
Copy link

prusswan commented Mar 6, 2018

output is VGA using Intel HD4000
For available resolutions, it may also depend on the screen/monitor you are using..

@ulli-kroll
Copy link

I have some monitor with 1920x1080, but I get only flickering with this resolution.
NO real picture, only top 50 lines or so are visible.
Running on a AMD SoC with 1GHz and most is done via DMA ...
Mabye I have some issue with the USB transfer with USB3

@klogg
Copy link
Author

klogg commented Mar 19, 2018

@ulli-kroll
Copy link

The is already something in drm which I use
drm_dev_is_unplugged()

@klogg
Copy link
Author

klogg commented May 5, 2020

Managed to get PLL setting for 800x480 by sniffing windows driver.

@klogg klogg closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants