Skip to content

Commit 2eb747a

Browse files
Dr. David Alan Gilberttomba
authored andcommitted
drm/omap: Clean up deadcode functions
dispc_enable_fifomerge() last use was removed by 2012's commit 85099f1 ("Revert "OMAPDSS: APPLY: add fifo merge support funcs"") dispc_has_writeback(), dispc_wb_get_framedone_irq(), dispc_wb_go(), dispc_wb_go_busy() and dispc_wb_setup() were changed from statics to public symbols and unwired from a structure by 2020's commit dac62bc ("drm/omap: remove dispc_ops") but didn't have any users. dispc_mgr_get_clock_div() got renamed from dispc_get_clock_div() and it's last use was removed in 2011 by commit 42c9dee ("OMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support") Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 93accc1 commit 2eb747a

File tree

2 files changed

+0
-159
lines changed

2 files changed

+0
-159
lines changed

drivers/gpu/drm/omapdrm/dss/dispc.c

Lines changed: 0 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,6 @@ u32 dispc_mgr_get_sync_lost_irq(struct dispc_device *dispc,
691691
return mgr_desc[channel].sync_lost_irq;
692692
}
693693

694-
u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc)
695-
{
696-
return DISPC_IRQ_FRAMEDONEWB;
697-
}
698-
699694
void dispc_mgr_enable(struct dispc_device *dispc,
700695
enum omap_channel channel, bool enable)
701696
{
@@ -726,30 +721,6 @@ void dispc_mgr_go(struct dispc_device *dispc, enum omap_channel channel)
726721
mgr_fld_write(dispc, channel, DISPC_MGR_FLD_GO, 1);
727722
}
728723

729-
bool dispc_wb_go_busy(struct dispc_device *dispc)
730-
{
731-
return REG_GET(dispc, DISPC_CONTROL2, 6, 6) == 1;
732-
}
733-
734-
void dispc_wb_go(struct dispc_device *dispc)
735-
{
736-
enum omap_plane_id plane = OMAP_DSS_WB;
737-
bool enable, go;
738-
739-
enable = REG_GET(dispc, DISPC_OVL_ATTRIBUTES(plane), 0, 0) == 1;
740-
741-
if (!enable)
742-
return;
743-
744-
go = REG_GET(dispc, DISPC_CONTROL2, 6, 6) == 1;
745-
if (go) {
746-
DSSERR("GO bit not down for WB\n");
747-
return;
748-
}
749-
750-
REG_FLD_MOD(dispc, DISPC_CONTROL2, 1, 6, 6);
751-
}
752-
753724
static void dispc_ovl_write_firh_reg(struct dispc_device *dispc,
754725
enum omap_plane_id plane, int reg,
755726
u32 value)
@@ -1498,17 +1469,6 @@ void dispc_ovl_set_fifo_threshold(struct dispc_device *dispc,
14981469
min(high, 0xfffu));
14991470
}
15001471

1501-
void dispc_enable_fifomerge(struct dispc_device *dispc, bool enable)
1502-
{
1503-
if (!dispc_has_feature(dispc, FEAT_FIFO_MERGE)) {
1504-
WARN_ON(enable);
1505-
return;
1506-
}
1507-
1508-
DSSDBG("FIFO merge %s\n", enable ? "enabled" : "disabled");
1509-
REG_FLD_MOD(dispc, DISPC_CONFIG, enable ? 1 : 0, 14, 14);
1510-
}
1511-
15121472
void dispc_ovl_compute_fifo_thresholds(struct dispc_device *dispc,
15131473
enum omap_plane_id plane,
15141474
u32 *fifo_low, u32 *fifo_high,
@@ -2814,95 +2774,6 @@ int dispc_ovl_setup(struct dispc_device *dispc,
28142774
return r;
28152775
}
28162776

2817-
int dispc_wb_setup(struct dispc_device *dispc,
2818-
const struct omap_dss_writeback_info *wi,
2819-
bool mem_to_mem, const struct videomode *vm,
2820-
enum dss_writeback_channel channel_in)
2821-
{
2822-
int r;
2823-
u32 l;
2824-
enum omap_plane_id plane = OMAP_DSS_WB;
2825-
const int pos_x = 0, pos_y = 0;
2826-
const u8 zorder = 0, global_alpha = 0;
2827-
const bool replication = true;
2828-
bool truncation;
2829-
int in_width = vm->hactive;
2830-
int in_height = vm->vactive;
2831-
enum omap_overlay_caps caps =
2832-
OMAP_DSS_OVL_CAP_SCALE | OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA;
2833-
2834-
if (vm->flags & DISPLAY_FLAGS_INTERLACED)
2835-
in_height /= 2;
2836-
2837-
DSSDBG("dispc_wb_setup, pa %x, pa_uv %x, %d,%d -> %dx%d, cmode %x, "
2838-
"rot %d\n", wi->paddr, wi->p_uv_addr, in_width,
2839-
in_height, wi->width, wi->height, wi->fourcc, wi->rotation);
2840-
2841-
r = dispc_ovl_setup_common(dispc, plane, caps, wi->paddr, wi->p_uv_addr,
2842-
wi->buf_width, pos_x, pos_y, in_width, in_height, wi->width,
2843-
wi->height, wi->fourcc, wi->rotation, zorder,
2844-
wi->pre_mult_alpha, global_alpha, wi->rotation_type,
2845-
replication, vm, mem_to_mem, DRM_COLOR_YCBCR_BT601,
2846-
DRM_COLOR_YCBCR_LIMITED_RANGE);
2847-
if (r)
2848-
return r;
2849-
2850-
switch (wi->fourcc) {
2851-
case DRM_FORMAT_RGB565:
2852-
case DRM_FORMAT_RGB888:
2853-
case DRM_FORMAT_ARGB4444:
2854-
case DRM_FORMAT_RGBA4444:
2855-
case DRM_FORMAT_RGBX4444:
2856-
case DRM_FORMAT_ARGB1555:
2857-
case DRM_FORMAT_XRGB1555:
2858-
case DRM_FORMAT_XRGB4444:
2859-
truncation = true;
2860-
break;
2861-
default:
2862-
truncation = false;
2863-
break;
2864-
}
2865-
2866-
/* setup extra DISPC_WB_ATTRIBUTES */
2867-
l = dispc_read_reg(dispc, DISPC_OVL_ATTRIBUTES(plane));
2868-
l = FLD_MOD(l, truncation, 10, 10); /* TRUNCATIONENABLE */
2869-
l = FLD_MOD(l, channel_in, 18, 16); /* CHANNELIN */
2870-
l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */
2871-
if (mem_to_mem)
2872-
l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */
2873-
else
2874-
l = FLD_MOD(l, 0, 26, 24); /* CAPTUREMODE */
2875-
dispc_write_reg(dispc, DISPC_OVL_ATTRIBUTES(plane), l);
2876-
2877-
if (mem_to_mem) {
2878-
/* WBDELAYCOUNT */
2879-
REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), 0, 7, 0);
2880-
} else {
2881-
u32 wbdelay;
2882-
2883-
if (channel_in == DSS_WB_TV_MGR)
2884-
wbdelay = vm->vsync_len + vm->vback_porch;
2885-
else
2886-
wbdelay = vm->vfront_porch + vm->vsync_len +
2887-
vm->vback_porch;
2888-
2889-
if (vm->flags & DISPLAY_FLAGS_INTERLACED)
2890-
wbdelay /= 2;
2891-
2892-
wbdelay = min(wbdelay, 255u);
2893-
2894-
/* WBDELAYCOUNT */
2895-
REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);
2896-
}
2897-
2898-
return 0;
2899-
}
2900-
2901-
bool dispc_has_writeback(struct dispc_device *dispc)
2902-
{
2903-
return dispc->feat->has_writeback;
2904-
}
2905-
29062777
int dispc_ovl_enable(struct dispc_device *dispc,
29072778
enum omap_plane_id plane, bool enable)
29082779
{
@@ -3742,23 +3613,6 @@ void dispc_mgr_set_clock_div(struct dispc_device *dispc,
37423613
cinfo->pck_div);
37433614
}
37443615

3745-
int dispc_mgr_get_clock_div(struct dispc_device *dispc,
3746-
enum omap_channel channel,
3747-
struct dispc_clock_info *cinfo)
3748-
{
3749-
unsigned long fck;
3750-
3751-
fck = dispc_fclk_rate(dispc);
3752-
3753-
cinfo->lck_div = REG_GET(dispc, DISPC_DIVISORo(channel), 23, 16);
3754-
cinfo->pck_div = REG_GET(dispc, DISPC_DIVISORo(channel), 7, 0);
3755-
3756-
cinfo->lck = fck / cinfo->lck_div;
3757-
cinfo->pck = cinfo->lck / cinfo->pck_div;
3758-
3759-
return 0;
3760-
}
3761-
37623616
u32 dispc_read_irqstatus(struct dispc_device *dispc)
37633617
{
37643618
return dispc_read_reg(dispc, DISPC_IRQSTATUS);

drivers/gpu/drm/omapdrm/dss/dss.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ u32 dispc_mgr_get_framedone_irq(struct dispc_device *dispc,
416416
enum omap_channel channel);
417417
u32 dispc_mgr_get_sync_lost_irq(struct dispc_device *dispc,
418418
enum omap_channel channel);
419-
u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc);
420419

421420
u32 dispc_get_memory_bandwidth_limit(struct dispc_device *dispc);
422421

@@ -458,20 +457,11 @@ int dispc_ovl_setup(struct dispc_device *dispc,
458457
int dispc_ovl_enable(struct dispc_device *dispc,
459458
enum omap_plane_id plane, bool enable);
460459

461-
bool dispc_has_writeback(struct dispc_device *dispc);
462-
int dispc_wb_setup(struct dispc_device *dispc,
463-
const struct omap_dss_writeback_info *wi,
464-
bool mem_to_mem, const struct videomode *vm,
465-
enum dss_writeback_channel channel_in);
466-
bool dispc_wb_go_busy(struct dispc_device *dispc);
467-
void dispc_wb_go(struct dispc_device *dispc);
468-
469460
void dispc_enable_sidle(struct dispc_device *dispc);
470461
void dispc_disable_sidle(struct dispc_device *dispc);
471462

472463
void dispc_lcd_enable_signal(struct dispc_device *dispc, bool enable);
473464
void dispc_pck_free_enable(struct dispc_device *dispc, bool enable);
474-
void dispc_enable_fifomerge(struct dispc_device *dispc, bool enable);
475465

476466
typedef bool (*dispc_div_calc_func)(int lckd, int pckd, unsigned long lck,
477467
unsigned long pck, void *data);
@@ -494,9 +484,6 @@ void dispc_ovl_compute_fifo_thresholds(struct dispc_device *dispc,
494484
void dispc_mgr_set_clock_div(struct dispc_device *dispc,
495485
enum omap_channel channel,
496486
const struct dispc_clock_info *cinfo);
497-
int dispc_mgr_get_clock_div(struct dispc_device *dispc,
498-
enum omap_channel channel,
499-
struct dispc_clock_info *cinfo);
500487
void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk);
501488

502489
#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS

0 commit comments

Comments
 (0)