Lines Matching +full:0 +full:xfff
13 #define DCSS_SCALER_CTRL 0x00
14 #define SCALER_EN BIT(0)
18 #define DCSS_SCALER_OFIFO_CTRL 0x04
19 #define OFIFO_LOW_THRES_POS 0
20 #define OFIFO_LOW_THRES_MASK GENMASK(9, 0)
29 #define DCSS_SCALER_SDATA_CTRL 0x08
30 #define YUV_EN BIT(0)
35 #define DCSS_SCALER_BIT_DEPTH 0x0C
36 #define LUM_BIT_DEPTH_POS 0
37 #define LUM_BIT_DEPTH_MASK GENMASK(1, 0)
40 #define DCSS_SCALER_SRC_FORMAT 0x10
41 #define DCSS_SCALER_DST_FORMAT 0x14
42 #define FORMAT_MASK GENMASK(1, 0)
43 #define DCSS_SCALER_SRC_LUM_RES 0x18
44 #define DCSS_SCALER_SRC_CHR_RES 0x1C
45 #define DCSS_SCALER_DST_LUM_RES 0x20
46 #define DCSS_SCALER_DST_CHR_RES 0x24
47 #define WIDTH_POS 0
48 #define WIDTH_MASK GENMASK(11, 0)
51 #define DCSS_SCALER_V_LUM_START 0x48
52 #define V_START_MASK GENMASK(15, 0)
53 #define DCSS_SCALER_V_LUM_INC 0x4C
54 #define V_INC_MASK GENMASK(15, 0)
55 #define DCSS_SCALER_H_LUM_START 0x50
56 #define H_START_MASK GENMASK(18, 0)
57 #define DCSS_SCALER_H_LUM_INC 0x54
58 #define H_INC_MASK GENMASK(15, 0)
59 #define DCSS_SCALER_V_CHR_START 0x58
60 #define DCSS_SCALER_V_CHR_INC 0x5C
61 #define DCSS_SCALER_H_CHR_START 0x60
62 #define DCSS_SCALER_H_CHR_INC 0x64
63 #define DCSS_SCALER_COEF_VLUM 0x80
64 #define DCSS_SCALER_COEF_HLUM 0x140
65 #define DCSS_SCALER_COEF_VCHR 0x200
66 #define DCSS_SCALER_COEF_HCHR 0x300
134 if ((temp >= 0 && B >= 0) || (temp < 0 && B < 0)) in div_q()
167 * @fc_q: fixed-point cutoff frequency normalized to range [0, 1]
183 for (phase = 0; phase < PSC_STORED_PHASES; phase++) { in dcss_scaler_gaussian_filter()
184 coef[phase][0] = 0; in dcss_scaler_gaussian_filter()
185 coef[phase][PSC_NUM_TAPS - 1] = 0; in dcss_scaler_gaussian_filter()
203 for (i = 0; i < mid; i++) { in dcss_scaler_gaussian_filter()
223 coef[phase_cnt & PSC_PHASE_MASK][tap_cnt1 >> PSC_BITS_FOR_PHASE] = 0; in dcss_scaler_gaussian_filter()
225 /* override phase 0 with identity filter if specified */ in dcss_scaler_gaussian_filter()
227 for (i = 0; i < PSC_NUM_TAPS; i++) in dcss_scaler_gaussian_filter()
228 coef[0][i] = i == (PSC_NUM_TAPS >> 1) ? in dcss_scaler_gaussian_filter()
229 (1 << PSC_COEFF_PRECISION) : 0; in dcss_scaler_gaussian_filter()
232 for (phase = 0; phase < PSC_STORED_PHASES; phase++) { in dcss_scaler_gaussian_filter()
233 int sum = 0; in dcss_scaler_gaussian_filter()
236 for (i = 0; i < PSC_NUM_TAPS; i++) in dcss_scaler_gaussian_filter()
238 for (i = 0; i < PSC_NUM_TAPS; i++) { in dcss_scaler_gaussian_filter()
253 for (i = 0; i < PSC_STORED_PHASES; i++) in dcss_scaler_nearest_neighbor_filter()
254 for (j = 0; j < PSC_NUM_TAPS; j++) in dcss_scaler_nearest_neighbor_filter()
256 (1 << PSC_COEFF_PRECISION) : 0; in dcss_scaler_nearest_neighbor_filter()
264 * @use_5_taps: 0 for 7 taps per phase, 1 for 5 taps
300 for (i = 0; i < 3; i++) { in dcss_scaler_ch_init_all()
303 ch->base_ofs = scaler_base + i * 0x400; in dcss_scaler_ch_init_all()
314 return 0; in dcss_scaler_ch_init_all()
333 return 0; in dcss_scaler_init()
340 for (ch_no = 0; ch_no < 3; ch_no++) { in dcss_scaler_exit()
343 dcss_writel(0, ch->base_reg + DCSS_SCALER_CTRL); in dcss_scaler_exit()
352 scaler_ctrl = en ? SCALER_EN | REPEAT_EN : 0; in dcss_scaler_ch_enable()
366 ch->sdata_ctrl |= en ? YUV_EN : 0; in dcss_scaler_yuv_enable()
372 ch->sdata_ctrl |= en ? RTRAM_8LINES : 0; in dcss_scaler_rtr_8lines_enable()
379 val = depth == 30 ? 2 : 0; in dcss_scaler_bit_depth_set()
394 PSC_LOC_HORZ_0_VERT_1_OVER_4 = 0,
489 c_vstart = 0; in dcss_scaler_fractions_set()
490 c_hstart = 0; in dcss_scaler_fractions_set()
548 dcss_scaler_write(ch, 0, DCSS_SCALER_V_LUM_START); in dcss_scaler_fractions_set()
551 dcss_scaler_write(ch, 0, DCSS_SCALER_H_LUM_START); in dcss_scaler_fractions_set()
567 return 0; in dcss_scaler_get_min_max_ratios()
576 for (i = 0; i < PSC_STORED_PHASES; i++) { in dcss_scaler_program_5_coef_set()
577 dcss_scaler_write(ch, ((coef[i][1] & 0xfff) << 16 | in dcss_scaler_program_5_coef_set()
578 (coef[i][2] & 0xfff) << 4 | in dcss_scaler_program_5_coef_set()
579 (coef[i][3] & 0xf00) >> 8), in dcss_scaler_program_5_coef_set()
581 dcss_scaler_write(ch, ((coef[i][3] & 0x0ff) << 20 | in dcss_scaler_program_5_coef_set()
582 (coef[i][4] & 0xfff) << 8 | in dcss_scaler_program_5_coef_set()
583 (coef[i][5] & 0xff0) >> 4), in dcss_scaler_program_5_coef_set()
584 base_addr + 0x40 + i * sizeof(u32)); in dcss_scaler_program_5_coef_set()
585 dcss_scaler_write(ch, ((coef[i][5] & 0x00f) << 24), in dcss_scaler_program_5_coef_set()
586 base_addr + 0x80 + i * sizeof(u32)); in dcss_scaler_program_5_coef_set()
592 dcss_scaler_write(ch, ((coef[phase][5] & 0xfff) << 16 | in dcss_scaler_program_5_coef_set()
593 (coef[phase][4] & 0xfff) << 4 | in dcss_scaler_program_5_coef_set()
594 (coef[phase][3] & 0xf00) >> 8), in dcss_scaler_program_5_coef_set()
596 dcss_scaler_write(ch, ((coef[phase][3] & 0x0ff) << 20 | in dcss_scaler_program_5_coef_set()
597 (coef[phase][2] & 0xfff) << 8 | in dcss_scaler_program_5_coef_set()
598 (coef[phase][1] & 0xff0) >> 4), in dcss_scaler_program_5_coef_set()
599 base_addr + 0x40 + i * sizeof(u32)); in dcss_scaler_program_5_coef_set()
600 dcss_scaler_write(ch, ((coef[phase][1] & 0x00f) << 24), in dcss_scaler_program_5_coef_set()
601 base_addr + 0x80 + i * sizeof(u32)); in dcss_scaler_program_5_coef_set()
611 for (i = 0; i < PSC_STORED_PHASES; i++) { in dcss_scaler_program_7_coef_set()
612 dcss_scaler_write(ch, ((coef[i][0] & 0xfff) << 16 | in dcss_scaler_program_7_coef_set()
613 (coef[i][1] & 0xfff) << 4 | in dcss_scaler_program_7_coef_set()
614 (coef[i][2] & 0xf00) >> 8), in dcss_scaler_program_7_coef_set()
616 dcss_scaler_write(ch, ((coef[i][2] & 0x0ff) << 20 | in dcss_scaler_program_7_coef_set()
617 (coef[i][3] & 0xfff) << 8 | in dcss_scaler_program_7_coef_set()
618 (coef[i][4] & 0xff0) >> 4), in dcss_scaler_program_7_coef_set()
619 base_addr + 0x40 + i * sizeof(u32)); in dcss_scaler_program_7_coef_set()
620 dcss_scaler_write(ch, ((coef[i][4] & 0x00f) << 24 | in dcss_scaler_program_7_coef_set()
621 (coef[i][5] & 0xfff) << 12 | in dcss_scaler_program_7_coef_set()
622 (coef[i][6] & 0xfff)), in dcss_scaler_program_7_coef_set()
623 base_addr + 0x80 + i * sizeof(u32)); in dcss_scaler_program_7_coef_set()
629 dcss_scaler_write(ch, ((coef[phase][6] & 0xfff) << 16 | in dcss_scaler_program_7_coef_set()
630 (coef[phase][5] & 0xfff) << 4 | in dcss_scaler_program_7_coef_set()
631 (coef[phase][4] & 0xf00) >> 8), in dcss_scaler_program_7_coef_set()
633 dcss_scaler_write(ch, ((coef[phase][4] & 0x0ff) << 20 | in dcss_scaler_program_7_coef_set()
634 (coef[phase][3] & 0xfff) << 8 | in dcss_scaler_program_7_coef_set()
635 (coef[phase][2] & 0xff0) >> 4), in dcss_scaler_program_7_coef_set()
636 base_addr + 0x40 + i * sizeof(u32)); in dcss_scaler_program_7_coef_set()
637 dcss_scaler_write(ch, ((coef[phase][2] & 0x00f) << 24 | in dcss_scaler_program_7_coef_set()
638 (coef[phase][1] & 0xfff) << 12 | in dcss_scaler_program_7_coef_set()
639 (coef[phase][0] & 0xfff)), in dcss_scaler_program_7_coef_set()
640 base_addr + 0x80 + i * sizeof(u32)); in dcss_scaler_program_7_coef_set()
684 (src_xres == dst_xres) && (ch->c_hstart == 0), in dcss_scaler_yuv_coef_set()
691 (src_yres == dst_yres) && (ch->c_vstart == 0), in dcss_scaler_yuv_coef_set()
734 a2r10g10b10_format = 0; in dcss_scaler_set_rgb10_order()
753 a2r10g10b10_format = 0; in dcss_scaler_set_rgb10_order()
774 unsigned int pixel_depth = 0; in dcss_scaler_setup()
829 for (chnum = 0; chnum < 3; chnum++) { in dcss_scaler_write_sclctrl()