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

S430 4.3" TFT not working as expected #2

Open
avafinger opened this issue Feb 9, 2018 · 3 comments
Open

S430 4.3" TFT not working as expected #2

avafinger opened this issue Feb 9, 2018 · 3 comments

Comments

@avafinger
Copy link

Hi @rafaello7 ,

I received a couple of S430 LCD recently and gave it try with your kernel 4.14.7+ but seems not working properly.
The S430 is detected and started displaying the kernel loading for a few seconds ( ~2 s ) and a blank screen suddenly follows.

The same kernel works fine with X710.

Kernel 4.14 finds the correct LCD:

	},{
		.name = "s430",
		.onewireType = 31,
		.i2c_touch_drv = "hx8528-a",
		.i2c_touch_reg = 0x48,
		.bpc  = 8,
		.p_width = 108,
		.p_height = 64,
		.mode = &mode_s430,
	},{

static const struct drm_display_mode mode_s430 = {
	.clock = 28492,
	.hdisplay = 480,
	.hsync_start = 480 + 64,
	.hsync_end = 480 + 64 + 16,
	.htotal = 480 + 64 + 16 + 0,
	.vdisplay = 800,
	.vsync_start = 800 + 32,
	.vsync_end = 800 + 32 + 16,
	.vtotal = 800 + 32 + 16 + 0,
	.vrefresh = 60,
	.flags = DRM_MODE_FLAG_NCSYNC
};

These are the timings for the kernel 4.4:

static struct lcd_desc s430 = {
	.width= 480,
	.height = 800,
	.p_width = 108,
	.p_height = 64,
	.bpp = 24,
	.freq = 60,

	.timing = {
		.h_fp = 64,
		.h_bp = 0,
		.h_sw = 16,
		.v_fp = 32,
		.v_fpe = 1,
		.v_bp = 0,
		.v_bpe = 1,
		.v_sw = 16,
	},
	.polarity = {
		.rise_vclk = 1,
		.inv_hsync = 1,
		.inv_vsync = 1,
		.inv_vden = 0,
	},
};

Do you have any idea what could cause this issue?

Appreciate if you can help.
Cheers

@avafinger
Copy link
Author

@rafaello7 ,
I will stick with 4.4 for a while until you decide or get motivated to work with 4.14.y. I wished to work with your kernel that i feel is a better work than 4.4, btw kernel 4.14.y has DVFS broken, idle mode i get 700 Mhz ~ 1100 Mhz while 400 Mhz in 4.4. Maybe you move your stuff to 4.4. Thanks for your work anyways.
BR
@avafinger

@avafinger
Copy link
Author

Reopen if you decide so.

@rafaello7
Copy link
Owner

in lcd_desc for kernel 4.4:
h_fp - horizontal front porch
h_sw - horizontal sync width
h_bp - horizontal back porch
v_fp - vertical front porch
v_sw - vertical sync width
v_bp - vertical back porch
Timings for kernel 4.14 may be calculated using formulas:
hsync_start = width + h_fp
hsync_end = width + h_fp + h_sw
htotal = width + h_fp + h_sw + h_bp
Vertical timings analogously.
The clock value is calculated as is htotal * vtotal * vrefresh / 1000 (it is in kHz).
Maybe the flags are bad, try to add DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC.

@rafaello7 rafaello7 reopened this May 4, 2018
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

2 participants