Skip to content

Commit 4e07155

Browse files
committed
Merge tag 'fbdev-for-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev updates from Helge Deller: - omapfb: Remove unused code (Dr. David Alan Gilbert) - sh7760fb: Fix memory leak in error path of sh7760fb_alloc_mem() (Zhen Lei) * tag 'fbdev-for-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: omapfb: Remove some deadcode fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()
2 parents 3e51108 + 8d74931 commit 4e07155

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

drivers/video/fbdev/omap2/omapfb/dss/dispc.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,17 +1230,6 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
12301230
dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu));
12311231
}
12321232

1233-
void dispc_enable_fifomerge(bool enable)
1234-
{
1235-
if (!dss_has_feature(FEAT_FIFO_MERGE)) {
1236-
WARN_ON(enable);
1237-
return;
1238-
}
1239-
1240-
DSSDBG("FIFO merge %s\n", enable ? "enabled" : "disabled");
1241-
REG_FLD_MOD(DISPC_CONFIG, enable ? 1 : 0, 14, 14);
1242-
}
1243-
12441233
void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
12451234
u32 *fifo_low, u32 *fifo_high, bool use_fifomerge,
12461235
bool manual_update)
@@ -3656,22 +3645,6 @@ void dispc_mgr_set_clock_div(enum omap_channel channel,
36563645
dispc_mgr_set_lcd_divisor(channel, cinfo->lck_div, cinfo->pck_div);
36573646
}
36583647

3659-
int dispc_mgr_get_clock_div(enum omap_channel channel,
3660-
struct dispc_clock_info *cinfo)
3661-
{
3662-
unsigned long fck;
3663-
3664-
fck = dispc_fclk_rate();
3665-
3666-
cinfo->lck_div = REG_GET(DISPC_DIVISORo(channel), 23, 16);
3667-
cinfo->pck_div = REG_GET(DISPC_DIVISORo(channel), 7, 0);
3668-
3669-
cinfo->lck = fck / cinfo->lck_div;
3670-
cinfo->pck = cinfo->lck / cinfo->pck_div;
3671-
3672-
return 0;
3673-
}
3674-
36753648
u32 dispc_read_irqstatus(void)
36763649
{
36773650
return dispc_read_reg(DISPC_IRQSTATUS);

drivers/video/fbdev/omap2/omapfb/dss/dss.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ void dispc_disable_sidle(void);
366366

367367
void dispc_lcd_enable_signal(bool enable);
368368
void dispc_pck_free_enable(bool enable);
369-
void dispc_enable_fifomerge(bool enable);
370369
void dispc_enable_gamma_table(bool enable);
371370

372371
typedef bool (*dispc_div_calc_func)(int lckd, int pckd, unsigned long lck,
@@ -388,8 +387,6 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
388387

389388
void dispc_mgr_set_clock_div(enum omap_channel channel,
390389
const struct dispc_clock_info *cinfo);
391-
int dispc_mgr_get_clock_div(enum omap_channel channel,
392-
struct dispc_clock_info *cinfo);
393390
void dispc_set_tv_pclk(unsigned long pclk);
394391

395392
u32 dispc_read_irqstatus(void);

drivers/video/fbdev/sh7760fb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,11 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
409409
vram = PAGE_SIZE;
410410

411411
fbmem = dma_alloc_coherent(info->device, vram, &par->fbdma, GFP_KERNEL);
412-
413412
if (!fbmem)
414413
return -ENOMEM;
415414

416415
if ((par->fbdma & SH7760FB_DMA_MASK) != SH7760FB_DMA_MASK) {
417-
sh7760fb_free_mem(info);
416+
dma_free_coherent(info->device, vram, fbmem, par->fbdma);
418417
dev_err(info->device, "kernel gave me memory at 0x%08lx, which is"
419418
"unusable for the LCDC\n", (unsigned long)par->fbdma);
420419
return -ENOMEM;

0 commit comments

Comments
 (0)