- 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;
|
||||
}
|
||||
|
||||
static inline int sandbox_sdl_remove_display(void)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int sandbox_sdl_sync(void *lcd_base)
|
||||
{
|
||||
return -ENODEV;
|
||||
|
@ -1768,10 +1768,13 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
||||
int s; // vertical subsample index
|
||||
unsigned char scanline_data[512], *scanline;
|
||||
|
||||
if (result->w > 512)
|
||||
if (result->w > 512) {
|
||||
scanline = (unsigned char *) STBTT_malloc(result->w, userdata);
|
||||
else
|
||||
if (!scanline)
|
||||
return;
|
||||
} else {
|
||||
scanline = scanline_data;
|
||||
}
|
||||
|
||||
y = off_y * vsubsample;
|
||||
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) {
|
||||
if (e->y1 > scan_y) {
|
||||
stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);
|
||||
if (!z)
|
||||
return;
|
||||
// find insertion point
|
||||
if (active == NULL)
|
||||
active = z;
|
||||
@ -2068,10 +2073,13 @@ static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e,
|
||||
int y,j=0, i;
|
||||
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);
|
||||
else
|
||||
if (!scanline)
|
||||
return;
|
||||
} else {
|
||||
scanline = scanline_data;
|
||||
}
|
||||
|
||||
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) {
|
||||
if (e->y0 != e->y1) {
|
||||
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);
|
||||
// insert at front
|
||||
z->next = active;
|
||||
|
@ -433,19 +433,17 @@ static int stm32_dsi_probe(struct udevice *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
|
||||
ret = device_get_supply_regulator(dev, "phy-dsi-supply",
|
||||
&priv->vdd_reg);
|
||||
if (ret && ret != -ENOENT) {
|
||||
dev_err(dev, "Warning: cannot get phy dsi supply\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
ret = device_get_supply_regulator(dev, "phy-dsi-supply",
|
||||
&priv->vdd_reg);
|
||||
if (ret && ret != -ENOENT) {
|
||||
dev_err(dev, "Warning: cannot get phy dsi supply\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (ret != -ENOENT) {
|
||||
ret = regulator_set_enable(priv->vdd_reg, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (ret != -ENOENT) {
|
||||
ret = regulator_set_enable(priv->vdd_reg, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_get_by_name(device->dev, "pclk", &clk);
|
||||
@ -493,8 +491,7 @@ static int stm32_dsi_probe(struct udevice *dev)
|
||||
err_clk:
|
||||
clk_disable(&clk);
|
||||
err_reg:
|
||||
if (IS_ENABLED(CONFIG_DM_REGULATOR))
|
||||
regulator_set_enable(priv->vdd_reg, false);
|
||||
regulator_set_enable(priv->vdd_reg, false);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user