- fix building sandbox with NO_SDL=1
- fix stb TrueType to check return value of STBTT_malloc() - remove not required DM_REGULATOR test in stm32 dsi driver -----BEGIN PGP SIGNATURE----- iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCYra5EQ4cYWd1c3RAZGVu eC5kZQAKCRBM6ATMmsalXB1XAJ9YS0T24BTOYW+5NDE+1xXx8cv1xgCggNpqT5W7 JNtpQwJWDaN341p1ocI= =QzEZ -----END PGP SIGNATURE----- Merge tag 'video-20220625' of https://source.denx.de/u-boot/custodians/u-boot-video - fix building sandbox with NO_SDL=1 - fix stb TrueType to check return value of STBTT_malloc() - remove not required DM_REGULATOR test in stm32 dsi driver
This commit is contained in:
commit
7596797085
@ -94,6 +94,11 @@ static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int sandbox_sdl_remove_display(void)
|
||||||
|
{
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int sandbox_sdl_sync(void *lcd_base)
|
static inline int sandbox_sdl_sync(void *lcd_base)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -1768,10 +1768,13 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
|||||||
int s; // vertical subsample index
|
int s; // vertical subsample index
|
||||||
unsigned char scanline_data[512], *scanline;
|
unsigned char scanline_data[512], *scanline;
|
||||||
|
|
||||||
if (result->w > 512)
|
if (result->w > 512) {
|
||||||
scanline = (unsigned char *) STBTT_malloc(result->w, userdata);
|
scanline = (unsigned char *) STBTT_malloc(result->w, userdata);
|
||||||
else
|
if (!scanline)
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
scanline = scanline_data;
|
scanline = scanline_data;
|
||||||
|
}
|
||||||
|
|
||||||
y = off_y * vsubsample;
|
y = off_y * vsubsample;
|
||||||
e[n].y0 = (off_y + result->h) * (float) vsubsample + 1;
|
e[n].y0 = (off_y + result->h) * (float) vsubsample + 1;
|
||||||
@ -1821,6 +1824,8 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
|||||||
while (e->y0 <= scan_y) {
|
while (e->y0 <= scan_y) {
|
||||||
if (e->y1 > scan_y) {
|
if (e->y1 > scan_y) {
|
||||||
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);
|
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);
|
||||||
|
if (!z)
|
||||||
|
return;
|
||||||
// find insertion point
|
// find insertion point
|
||||||
if (active == NULL)
|
if (active == NULL)
|
||||||
active = z;
|
active = z;
|
||||||
@ -2068,10 +2073,13 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
|||||||
int y,j=0, i;
|
int y,j=0, i;
|
||||||
float scanline_data[129], *scanline, *scanline2;
|
float scanline_data[129], *scanline, *scanline2;
|
||||||
|
|
||||||
if (result->w > 64)
|
if (result->w > 64) {
|
||||||
scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata);
|
scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata);
|
||||||
else
|
if (!scanline)
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
scanline = scanline_data;
|
scanline = scanline_data;
|
||||||
|
}
|
||||||
|
|
||||||
scanline2 = scanline + result->w;
|
scanline2 = scanline + result->w;
|
||||||
|
|
||||||
@ -2105,6 +2113,8 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
|||||||
while (e->y0 <= scan_y_bottom) {
|
while (e->y0 <= scan_y_bottom) {
|
||||||
if (e->y0 != e->y1) {
|
if (e->y0 != e->y1) {
|
||||||
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
|
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);
|
||||||
|
if (!z)
|
||||||
|
return;
|
||||||
STBTT_assert(z->ey >= scan_y_top);
|
STBTT_assert(z->ey >= scan_y_top);
|
||||||
// insert at front
|
// insert at front
|
||||||
z->next = active;
|
z->next = active;
|
||||||
|
@ -433,19 +433,17 @@ static int stm32_dsi_probe(struct udevice *dev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
|
ret = device_get_supply_regulator(dev, "phy-dsi-supply",
|
||||||
ret = device_get_supply_regulator(dev, "phy-dsi-supply",
|
&priv->vdd_reg);
|
||||||
&priv->vdd_reg);
|
if (ret && ret != -ENOENT) {
|
||||||
if (ret && ret != -ENOENT) {
|
dev_err(dev, "Warning: cannot get phy dsi supply\n");
|
||||||
dev_err(dev, "Warning: cannot get phy dsi supply\n");
|
return -ENODEV;
|
||||||
return -ENODEV;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ret != -ENOENT) {
|
if (ret != -ENOENT) {
|
||||||
ret = regulator_set_enable(priv->vdd_reg, true);
|
ret = regulator_set_enable(priv->vdd_reg, true);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_get_by_name(device->dev, "pclk", &clk);
|
ret = clk_get_by_name(device->dev, "pclk", &clk);
|
||||||
@ -493,8 +491,7 @@ static int stm32_dsi_probe(struct udevice *dev)
|
|||||||
err_clk:
|
err_clk:
|
||||||
clk_disable(&clk);
|
clk_disable(&clk);
|
||||||
err_reg:
|
err_reg:
|
||||||
if (IS_ENABLED(CONFIG_DM_REGULATOR))
|
regulator_set_enable(priv->vdd_reg, false);
|
||||||
regulator_set_enable(priv->vdd_reg, false);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user