mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 17:54:13 +08:00
-mst: Fix NO_STOP_BIT bit offset (Wayne)
-sun4i: Fix RGB_DIV clock min divider on old hardware (Chen-Yu) -fb_helper: Fix bits_per_pixel param set behavior to round up (Geert) Cc: Wayne Lin <Wayne.Lin@amd.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be> -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEHF6rntfJ3enn8gh8cywAJXLcr3kFAl4WQl4ACgkQcywAJXLc r3kQYwf7Bb+9TIlGf2WTWHbkoPdCN3qgu5XHWGbMv4OjcBVMeBE1+Lx4X5ihwFkC DuRKvlnW9gfMJg9l+i1PdYuBMFUlcGg3pBmdBEdz0eIZfP0ZL3J9J/s6oZSwuz4v TDWQEXKD+9MRmR3MtW+C8qIf6EevWHaVZpvvKhmVjf9Sredm2gEQwkBpUXSGGJ/w FBhvC4zL/iLQOp3wX0sjdnfBc6uXM7JB+mHMXTcAJ3eey9HGAQXQvbWROaTCKuGq L5hdz4RMiJ8+gTO9tZ6dzlfzZdY/wTQgwdVw3yVeGfeeC32VOjsUGWI5Jpb/SA03 gcHwNt/tMXZ8c0TCq5QNGAoTWUcrrg== =4GUy -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2020-01-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes mst: Fix NO_STOP_BIT bit offset (Wayne) sun4i: Fix RGB_DIV clock min divider on old hardware (Chen-Yu) fb_helper: Fix bits_per_pixel param set behavior to round up (Geert) Cc: Wayne Lin <Wayne.Lin@amd.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20200108205949.GA233273@art_vandelay
This commit is contained in:
commit
2c3addd839
@ -393,7 +393,7 @@ drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req,
|
||||
memcpy(&buf[idx], req->u.i2c_read.transactions[i].bytes, req->u.i2c_read.transactions[i].num_bytes);
|
||||
idx += req->u.i2c_read.transactions[i].num_bytes;
|
||||
|
||||
buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 5;
|
||||
buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 4;
|
||||
buf[idx] |= (req->u.i2c_read.transactions[i].i2c_transaction_delay & 0xf);
|
||||
idx++;
|
||||
}
|
||||
|
@ -1283,7 +1283,7 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
|
||||
* Changes struct fb_var_screeninfo are currently not pushed back
|
||||
* to KMS, hence fail if different settings are requested.
|
||||
*/
|
||||
if (var->bits_per_pixel != fb->format->cpp[0] * 8 ||
|
||||
if (var->bits_per_pixel > fb->format->cpp[0] * 8 ||
|
||||
var->xres > fb->width || var->yres > fb->height ||
|
||||
var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
|
||||
DRM_DEBUG("fb requested width/height/bpp can't fit in current fb "
|
||||
@ -1308,6 +1308,11 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
|
||||
drm_fb_helper_fill_pixel_fmt(var, fb->format->depth);
|
||||
}
|
||||
|
||||
/*
|
||||
* Likewise, bits_per_pixel should be rounded up to a supported value.
|
||||
*/
|
||||
var->bits_per_pixel = fb->format->cpp[0] * 8;
|
||||
|
||||
/*
|
||||
* drm fbdev emulation doesn't support changing the pixel format at all,
|
||||
* so reject all pixel format changing requests.
|
||||
|
@ -489,7 +489,7 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon,
|
||||
|
||||
WARN_ON(!tcon->quirks->has_channel_0);
|
||||
|
||||
tcon->dclk_min_div = 1;
|
||||
tcon->dclk_min_div = tcon->quirks->dclk_min_div;
|
||||
tcon->dclk_max_div = 127;
|
||||
sun4i_tcon0_mode_set_common(tcon, mode);
|
||||
|
||||
@ -1426,12 +1426,14 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon,
|
||||
static const struct sun4i_tcon_quirks sun4i_a10_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.has_channel_1 = true,
|
||||
.dclk_min_div = 4,
|
||||
.set_mux = sun4i_a10_tcon_set_mux,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun5i_a13_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.has_channel_1 = true,
|
||||
.dclk_min_div = 4,
|
||||
.set_mux = sun5i_a13_tcon_set_mux,
|
||||
};
|
||||
|
||||
@ -1440,6 +1442,7 @@ static const struct sun4i_tcon_quirks sun6i_a31_quirks = {
|
||||
.has_channel_1 = true,
|
||||
.has_lvds_alt = true,
|
||||
.needs_de_be_mux = true,
|
||||
.dclk_min_div = 1,
|
||||
.set_mux = sun6i_tcon_set_mux,
|
||||
};
|
||||
|
||||
@ -1447,11 +1450,13 @@ static const struct sun4i_tcon_quirks sun6i_a31s_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.has_channel_1 = true,
|
||||
.needs_de_be_mux = true,
|
||||
.dclk_min_div = 1,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun7i_a20_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.has_channel_1 = true,
|
||||
.dclk_min_div = 4,
|
||||
/* Same display pipeline structure as A10 */
|
||||
.set_mux = sun4i_a10_tcon_set_mux,
|
||||
};
|
||||
@ -1459,11 +1464,13 @@ static const struct sun4i_tcon_quirks sun7i_a20_quirks = {
|
||||
static const struct sun4i_tcon_quirks sun8i_a33_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.has_lvds_alt = true,
|
||||
.dclk_min_div = 1,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun8i_a83t_lcd_quirks = {
|
||||
.supports_lvds = true,
|
||||
.has_channel_0 = true,
|
||||
.dclk_min_div = 1,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun8i_a83t_tv_quirks = {
|
||||
@ -1477,11 +1484,13 @@ static const struct sun4i_tcon_quirks sun8i_r40_tv_quirks = {
|
||||
|
||||
static const struct sun4i_tcon_quirks sun8i_v3s_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.dclk_min_div = 1,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun9i_a80_tcon_lcd_quirks = {
|
||||
.has_channel_0 = true,
|
||||
.needs_edp_reset = true,
|
||||
.has_channel_0 = true,
|
||||
.needs_edp_reset = true,
|
||||
.dclk_min_div = 1,
|
||||
};
|
||||
|
||||
static const struct sun4i_tcon_quirks sun9i_a80_tcon_tv_quirks = {
|
||||
|
@ -224,6 +224,7 @@ struct sun4i_tcon_quirks {
|
||||
bool needs_de_be_mux; /* sun6i needs mux to select backend */
|
||||
bool needs_edp_reset; /* a80 edp reset needed for tcon0 access */
|
||||
bool supports_lvds; /* Does the TCON support an LVDS output? */
|
||||
u8 dclk_min_div; /* minimum divider for TCON0 DCLK */
|
||||
|
||||
/* callback to handle tcon muxing options */
|
||||
int (*set_mux)(struct sun4i_tcon *, const struct drm_encoder *);
|
||||
|
Loading…
Reference in New Issue
Block a user