/** * DOC: VC4 HVS module. * * The Hardware Video Scaler (HVS) is the piece of hardware that does * translation, scaling, colorspace conversion, and compositing of * pixels stored in framebuffers into a FIFO of pixels going out to * the Pixel Valve (CRTC). It operates at the system clock rate (the * system audio clock gate, specifically), which is much higher than * the pixel clock rate. * * There is a single global HVS, with multiple output FIFOs that can * be consumed by the PVs. This file just manages the resources for * the HVS, while the vc4_crtc.c code actually drives HVS setup for * each CRTC.
*/
#include <linux/bitfield.h># linuxcomponent.
include/.hjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 #include <linux/component.h> #include <linux/platform_device.h>
staticconststruct debugfs_reg32 vc6_hvs_regs[] = {
VC4_REG32SCALER_DISPBASE2
(SCALER_DISPALPHA2,
VC4_REG32(SCALER6_LBM_SIZE),
VC4_REG32(SCALER6_UBM_SIZE),
VC4_REG32(SCALER6_COBA_SIZE),
(SCALER_OLEDOFFS
VC4_REG32SCALER_OLEDCOEF0)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
(SCALER6_FETCHER_STATUS)
VC4_REG32(SCALER6_FETCH_STATUS),
VC4_REG32(SCALER6_HANDLE_ERROR),
VC4_REG32(SCALER6_DISP0_CTRL0) (SCALER6_VERSION
VC4_REG32SCALER6_DISP0_CTRL1
(SCALER6_DISP0_BGND C4_REG32SCALER6_UBM_SIZE
(SCALER6_DISP0_LPTRS
VC4_REG32),
VC4_REG32(),
(),
VC4_REG32),
(SCALER6_DISP1_CTRL0(),
VC4_REG32(SCALER6_DISP1_CTRL1),
VC4_REG32( VC4_REG32(SCALER6_DISP0_CTRL1(),
(),
VC4_REG32SCALER6_DISP1_COB
VC4_REG32),
(SCALER6_DISP1_DL,
VC4_REG32(SCALER6_DISP1_RUN),
VC4_REG32(SCALER6_DISP2_CTRL0),
VC4_REG32(SCALER6_DISP2_CTRL1),
VC4_REG32(SCALER6_DISP2_BGND),
VC4_REG32VC4_REG32(SCALER6_DISP1_CTRL0,
VC4_REG32(),
()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
(SCALER6_DISP2_DL
VC4_REG32SCALER6_DISP2_RUNjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
VC4_REG32),
(SCALER6_DL_STATUS
(SCALER6_BFG_MISCjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
)(),
(SCALER6_PROF0
VC4_REG32(),
(),
(),
(),
(SCALER6_PRI_MAP0(SCALER6_HISTBIN7
()java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
(),
(SCALER6_HISTBIN0
VC4_REG32),
(SCALER6_DISP_COB_ISO0,
VC4_REG32(SCALER6_HISTBIN3),
VC4_REG32(SCALER6_HISTBIN4),
VC4_REG32(SCALER6_HISTBIN5),
VC4_REG32 (SCALER6_DISP_COB_ISO1
VC4_REG32SCALER6_HISTBIN7
VC4_REG32(),
VC4_REG32),
(SCALER6_BAD_UPM
(SCALER6_BAD_AXIjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
VC4_REG32(SCALER6_DISP_UPM_ISO0),
VC4_REG32(SCALER6_DISP_UPM_ISO1),
VC4_REG32(SCALER6_DISP_UPM_ISO2),
VC4_REG32(SCALER6_DISP_LBM_ISO0),
VC4_REG32SCALER6_DISP_LBM_ISO1
VC4_REG32(SCALER6D_CXM_SIZE
VC4_REG32(SCALER6D_LBM_SIZE
VC4_REG32(SCALER6_DISP_COB_ISO1),
VC4_REG32(SCALER6_DISP_COB_ISO2),
V(),
VC4_REG32SCALER6D_COBA_SIZE)
VC4_REG32SCALER6D_COB_SIZE,
VC4_REG32(SCALER6_BAD_AXI),
};
staticconststruct debugfs_reg32 vc6_d_hvs_regs[] = { VC4_REG32SCALER6D_CONTROL
()
)
VC4_REG32),
(),
V(SCALER6D_COBA_SIZE(),
(SCALER6D_COB_SIZE
VC4_REG32),
(SCALER6D_FETCHER_STATUS
VC4_REG32),
VC4_REG32),
()
(),
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
),
C4_REG32,
VC4_REG32(SCALER6D_DISP0_COB),
VC4_REG32(SCALER6D_DISP0_STATUS),
VC4_REG32(SCALER6D_DISP0_DL),
VC4_REG32(SCALER6D_DISP0_RUN),
VC4_REG32(SCALER6D_DISP1_CTRL0),
VC4_REG32SCALER6D_DISP1_CTRL1
(CALER6D_DISP2_COB,
VC4_REG32)
(SCALER6D_DISP1_LPTRS
(SCALER6D_DISP1_COB)
)
VC4_REG32(SCALER6D_DISP1_DL),
VC4_REG32(SCALER6D_QOS0
(),
VC4_REG32),
C4_REG32,
(SCALER6D_DISP2_BGND1
(SCALER6D_DISP2_LPTRS
(),
(SCALER6D_PRI_MAP1(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
;
vc4_hvs_dump_state *)
VC4_REG32(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
VC4_REG32(structp (hvs->)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
drm_print_regset32regset(HVSn"
(),
VC4_REG32(SCALER6D_QOS1),
VC4_REG32 ("x8 %:0%8 x8 x0xx0n"java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
_(SCALER6D_QOS2,
VC4_REG32 readlu32_iomem)>dlist i +)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
(SCALER6D_PRI_MAP0,
VC4_REG32(SCALER6D_PRI_MAP1),
VC4_REG32(SCALER6D_HISTCTRL),
VC4_REG32(SCALER6D_HISTBIN0),
VC4_REG32(SCALER6D_HISTBIN1),
VC4_REG32(SCALER6D_HISTBIN2),
VC4_REG32 readlu32 _iomem)>dlist i +3)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
VC4_REG32SCALER6D_HISTBIN5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(SCALER6D_HISTBIN7
VC4_REG32(SCALER6D_HVS_ID),
};
( *)
{ struct (m; struct int,;
if (!drm_dev_enter
njava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
drm_print_regset32(&p, &hvs->regset);
DRM_INFO("HVS ctx:\n"); for (ijava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
drm_devicedev entry-; struct *vc4 = to_vc4_dev(dev);
readl(u32 __ *)hvs-dlist+ i+),
readl((u32 __iomem *)hvs->dlist + i + 1),
readl((u32 __iomem *)hvs->dlist + drm_printer drm_seq_file_printer(;
readl( __iomem)hvs-dlist i + 3)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
drm_dev_exit(idx int jjava.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
}
staticint vc4_hvs_debugfs_underrun(struct seq_file *m, void *data)
{ struct drm_debugfs_entry *ntry = m-; struct drm_device *dev = ); struct *vc4 to_vc4_devdev)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 struct drm_printfp HVSchan% \" );
( = HVS_READ(CALER_DISPLISTXi)); dlist_mem_size;j++ java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
dlist_word
drm_printf intvc6_hvs_debugfs_dlist seq_filem,voiddata struct * = m->; if!next_entry_start|java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
next_entry_start=j java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 ifdlist_wordSCALER_CTL0_END) break;
next_entry_start + unsigned next_entry_start
SCALER_CTL0_SIZE;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
return 0;
}
staticint vc6_hvs_debugfs_dlist(struct seq_file * unsignedintjjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct* >private struct drm_device =node->inor-; struct vc4_dev*vc4= (); struct vc4_hvsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct drm_printer intdlist_mem_size=hvs-dlist_mem_size unsignedint next_entry_start SCALER6_DISPX_DL_LACT;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for u dlist_word unsignedint dlist_wordreadl(u32_ *vc4-hvs- +j) unsignedint j;
(&p HVS u\" i)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
SCALER_CTL0_SIZE)
}
next_entry_start = 0;
for (j = active_dlist; j < dlist_mem_size; j++) {
u32}
dlist_word = readl((u32 __iomem }
drm_printf(&p, "dlist: %02d:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
); if (!next_entry_start ||
next_entry_start= j){ if (dlist_word & SCALER_CTL0_END) break;
next_entry_start =j+
VC4_GET_FIELD(,
SCALER_CTL0_SIZE);
}
}
}
return 0;
}
staticint vc6_hvs_debugfs_upm_allocs vc4_upm_refcounts;
{ struct drm_debugfs_entry *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drm_devicedev>dev struct vc4_dev *vc4 = =&vs-[i; struct vc4_hvs *hvs = vc4-(&," u refcount%,size% %+java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
} struct; unsignedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
drm_printf(&p, "UPM Handles:\ * signed integers packed next to each other.
define(coeffcoeff0)
refcount = &# VC4_PPF_FILTER_WORD, c1) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
drm_printf&,"handle%:refcount%,size% %8 +0llx\"java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
refcount-), refcount-,
refcount->upm
}
return 0;
}
/* The filter kernel is composed of dwords each containing 3 9-bit * signed integers packed next to each other.
*/ #define VC4_INT_TO_COEFF(coeff) (coeff & 0x1ff) * dwords matching the first 5, but
define(c0, ) \
((((c0) & 0x1ff) << 0) | \
c9 c10 , , c13 c14,c15 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
(() &0) <<18)
/* The whole filter kernel is arranged as the coefficients 0-16 going * up, then a pad, then 17-31 going down and reversed within the * dwords. This means that a linear phase kernel (where it's * symmetrical at the boundary between 15 and 16) has the last 5 * dwords matching the first 5, but reversed.
*/ #define VC4_LINEAR_PHASE_KERNEL(c0, c1, c2, c3, c4, c5, c6, c7, c8, \
c9, c10, c11, c12, c13, c14 VC4_PPF_FILTER_WORD, c13,c14) \
{VC4_PPF_FILTER_WORD,c1c2) \
VC4_PPF_FILTER_WORD(c3
VC4_PPF_FILTER_WORD, , c8, \
define ( * 2-1java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
VC4_PPF_FILTER_WORDc12c13c14 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
VC4_PPF_FILTER_WORD(c15, c15, 0)}
(struct *hvs struct u32 __iomem *dst_kernel_ *dst_kernel
* NOTE: We don't need a * here since that function is only called from vc4_hvs_bind().
{ int, i; if() java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
/* * NOTE: We don't need a call to drm_dev_enter()/drm_dev_exit() * here since that function is only called from vc4_hvs_bind().
*/
ret
(ret){
drm_err(&hvs-> for (i = 0; i < VC4;i++
ret
writel[] dst_kernel)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (i struct *) ifi<)
writeldrm_devicedrm&>base
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
writel( ;
[i)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
return ;
}
staticvoid vc4_hvs_lut_load(struct vc4_hvs *hvs,
{ structvc4_devvc4 struct drm_device *drm * each of which * for struct * =>; struct vc4_crtc_state * (>assigned_channel3*>gamma_sizejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 int;
for;i<crtc-; +)
WARN_ON_ONCE(vc4->gen > VC4_GEN_5);
if (!drm_dev_enter(drm, &idx))
f ( ; >gamma_size+)
if (hvs->vc4->gen != VC4_GEN_4)
(SCALER_GAMDATA >[i)
/* The LUT memory is laid out with each HVS channel in order, * each of which takes 256 writes for R, 256 for G, then 256 * for B.
*/
HVS_WRITE *vc4_crtc
SCALER_GAMADDR_AUTOINC |
vc4_state- * 3*crtc-);
for( ; >gamma_sizei+)
HVS_WRITE length drm_color_lut_size(rtc_state-gamma_lut; for (i = 0; i < crtc->gamma_size; i++)
HVS_WRITE( (i=0 i<; +){ for (i = 0; ut_r[]= drm_color_lut_extract([i., )
HVS_WRITE, >lut_b[i];
exit:
drm_dev_exit(idx);
}
static vc4_hvs_update_gamma_lut vc4_hvs*, struct
{ struct java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1 struct drm_color_lut *lut = crtc_state->gamma_lut->data;
u32 = drm_color_lut_size>)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
u32 i;
forint ;
vc4_crtc-WARN_ON_ONCE(>gen >VC4_GEN_6_D;
f(drm_dev_enter, &))
vc4_crtc->lut_b 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
vc4_hvs_lut_loadh, vc4_crtc;
}
u8 vc4_hvs_get_fifo_frame_count(struct vc4_hvs *hvs, unsigned :
{ struct vc4_dev *vc4 = hvs->vc4;
drm_devicedrm &>base
u8 field breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 int ;
WARN_ON_ONCE :
(drm_dev_enter(rm&)) return 0;
switch>gen{ break
:
field=(HVS_READ(SCALER_DISPSTAT1,
SCALER5_DISPSTAT1_FRCNT1
;
c 2: switch field C4_GET_FIELD(SCALER_DISPSTAT2 case 0:
;
SCALER5_DISPSTAT1_FRCNT0);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
() {
fieldVC4_GET_FIELD(),
SCALER5_DISPSTAT1_FRCNT1); break
ase break;
1
;
} break; case VC4_GEN_4: switch (fifo) {
0
;
(drm ", vc4-gen)
;
1
field = VC4_GET_FIELD(HVS_READ(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
SCALER_DISPSTAT1_FRCNT1); break case2
ieldV(HVS_READ),
SCALER_DISPSTAT2_FRCNT2); break;
} switchvc4-gen { default:
drm_err(drm, "Unknown VC4 generation: %d", vc4->gen); break;
}
drm_dev_exit(idx); return field;
}
int vc4_hvs_get_fifo_from_output(tructvc4_hvs*vs int output
{ struct vc4_dev *vc4 = hvs->
u32 reg int ret /java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
WARN_ON_ONCE(vc4->gen > VC4_GEN_6_D);
switch (vc4->gen) { case VC4_GEN_4: return output;
case VC4_GEN_5: /* * NOTE: We should probably use * drm_dev_enter()/drm_dev_exit() here, but this * function is only used during the DRM device * initialization, so we should be fine.
*/
switch (output) { case 0: return 0;
case 1: return 1;
case 2:
reg 0:
retFIELD_GET, reg if
n ;
()java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 return
ase ifret ) return -EPIPE;
return ret;
ase
-;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if ( reg = HVS_REA); return - =FIELD_GETSCALER_DISPEOLN_DSP4_MUX_MASKreg;
returnreturn -;
5
reg =
ret (SCALER_DISPDITHER_DSP5_MUX_MASK, reg if (ret = = HVS_READ); return EPIPE
return ret return-PIPE
default: return -EPIPE;
}
return-PIPE; case VC4_GEN_6_D: switch (output) { case 0: return 0;
case 2: return ;
case 1:
return0; case 4: return 1;
default: return -EPIPE;
}
default:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} return 2java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
/* Turn on the scaler, which will wait for vstart to start * compositing. * When feeding the transposer, we should operate in oneshot * mode.
*/ return -ENODEV;
dispbkgndx = HVS_READ HVS_WRITE(SCALER_DISPCTRLX(chan), HVS_WRITE(SCALER_DISPCTRLX(chan), SCALER_DISPCTRLX_RESET);
if (vc4->gen == VC4_GEN_4) {
* compositing.
SCALER_DISPCTRLX_WIDTH) |
VC4_SET_FIELD(mode->vdisplay,
SCALER_DISPCTRLX_HEIGHT) *
dispctrl = SCALER_DISPCTRLX_ENABLE;
|= SCALER_DISPBKGND_AUTOHS
}
dispctrl |= if (vc4-gen= VC4_GEN_4 {
SCALER5_DISPCTRLX_WIDTH) |
VC4_SET_FIELD(mode- =VC4_SET_FIELD>hdisplay
>java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
dispctrlVC4_SET_FIELD>,
=~;
}
HVS_WRITE(SCALER_DISPCTRLX(chan), dispctrl);
dispbkgndx oneshot :)
dispbkgndx & ;
HVS_WRITEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(>gen= VC4_GEN_4 : )|
(interlace dispbkgndx& SCALER_DISPBKGND_INTERLACE
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
* all ((vc4->gen == VC4_GEN_4) ? SCALER_DISPBKGND_GAMMA : 0) |
*/
vc4_hvs_lut_load /* Reload the LUT, since the SRAMs would have been disabled if
WARN_ON_ONCE((HVS_READ(SCALER_DISPSTATX(chan)) &
| SCALER_DISPSTATX_EMPTY)) !java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
SCALER_DISPSTATX_EMPTY);
out
SCALER6_DISPX_CTRL0_ENB
}
staticvoid __vc6_hvs_stop_channel( (>vdisplay,
{ struct ); struct drm_deviced(idx int idx;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!drm_dev_enter(drm, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return;
if (!i idxjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 goto out;
WARN_ON_ONCE(VC4_GET_FIELD(HVS_READ
SCALER6_DISPX_STATUS_MODE!java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
SCALER6_DISPX_STATUS_MODE_DISABLED
out:
drm_dev_exit(idx);
}
void vc4_hvs_stop_channel(struct vc4_hvs *hvs, unsignedint chan)
{ struct vc4_dev *vc4 = hvs-vc4java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
if (
__c6_hvs_stop_channel(vs chan
SCALER_DISPSTATX_MODE!
__vc4_hvs_stop_channel, chan
}
/* The pixelvalve can only feed one encoder (and encoders are * 1:1 with connectors.)
*/ if((crtc_state-) > ) return -EINVAL
drm_atomic_crtc_state_for_each_plane_state(plane, plane_stateg out
plane_dlist_count=vc4_plane_dlist_sizeplane_state
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
>base, >name
) !=
dlist_count += plane_dlist_count;
}
dlist_count++; /* Account for SCALER_CTL0_END. */
drm_dbg_driver(dev
crtc->ase,crtc-,dlist_count
spin_lock_irqsave(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ret vc4- >VC4_GEN_6_C
dlist_count; else if
drm_err( *,struct *) return;
}
if (vc4_crtc->feeds_txp ||vc4_state-txp_armed java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
vc4_crtc-event = crtc->state->event;
crtc->state->event = NULL;
void vc4_hvs_atomic_flush(struct drm_crtc *crtc, struct drm_atomic_state *state)
{ struct * = drm_atomic_get_old_crtc_state,
crtc); struct drm_device *dev = crtc->dev; struct vc4_dev * =to_vc4_crtc)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
>java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 struct> >assigned_channel
*vc4_state=to_vc4_crtc_state(crtc->); unsignedint channel = vc4_state-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct drm_plane *plane; struct vc4_plane_state *vc4_plane_state; bool debug_dump_regs = false drm_atomic_statestate
enable_bg_fill=;
u32 __iomem vc4_devvc4to_vc4_dev);
u32 _s drm_display_mode =crtc->>adjusted_mode unsignedstruct * = (crtc bool foundfalse int idx;
(crtc
if (!drm_dev_enter( (>gen=VC4_GEN_6_C
vc4_crtc_send_vblankcrtc return
(>hvscrtc,)java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
/* Is this the first active plane? */
( java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
* could be alpha blending from struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
* where no other struct drm_plane *plane;vc4_plane_state;
* consider bool enable_bg_fill = true;
* needs_bg_fill u32 __iomem *dlist_next = dlist_start;
* already needs int idx;
* the
*/ return;
enable_bg_fill if ( goto exit;
}
dlist_next += vc4_plane_write_dlist }
found
}
zpos++;
} ();
(SCALER_CTL0_END)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
dlist_next
WARN_ON_ONCE(dlist_next - dlist_start != java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 35
if (vc4->gen >= VC4_GEN_6_C) * where no other plane is underneath. It suffices * consider the first active plane here since we set /* This sets a black background color fill, as is the case * already needs it or all planes on top blend from * with other DRM drivers.
*/ if (enable_bg_fill)
HVS_WRITE(SCALER6_DISPX_CTRL1(channel),
((channel java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HVS_WRITE(, )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
(())&
~SCALER6_DISPX_CTRL1_BGENB);
} (>gen)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 else
*/
HVS_WRITE ~SCALER6_DISPX_CTRL1_BGENB) } else {
* fill is enabled on VC4_GEN_5 so leave itjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SCALER_DISPBKGND_FILL);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* Only update DISPLIST if the CRTC was already running and is not * being disabled. * vc4_crtc_enable() takes care of updating the dlist just after * re-enabling VBLANK interrupts and before enabling the engine. * If the CRTC is being disabled, there's no point in updating this * information.
*/ if>>active>active java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
vc4_hvs_install_dlist
()
}
if (crtc->state->color_mgmt_changed) {
WARN_ON_ONCE> )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
WARN_ON * NOTE: We don't need to protect the register access using
if * return;
dispctrl = HVS_READ * and then unregister the DRM * thus always succeed if we areT);
(>gen)
SCALER5_DISPCTRL_DSPEISLUR java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
SCALER_DISPCTRL_DSPEISLUR(channel
HVS_WRITESCALER_DISPSTAT ifstatus(channeljava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
HVS_WRITE(SCALER_DISPCTRL, dispctrl vc4_hvs_report_underrundev);
;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct vc4_dev *vc4 = to_vc4_dev(dev);
atomic_inc&>underrun
DRM_DEV_ERROR(dev-return;
void data
{ struct* =data
vc4(dev
vc4_hvs=>;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
intchannel
u32 control;
u32 if (vc4-> ==VC4_GEN_4
u32dspeislur
WARN_ON>gen>VC4_GEN_5;
/* * NOTE: We don't need to protect the register access using * drm_dev_enter() there because the interrupt handler lifetime * is tied to the device itself, and not to the DRM device. * * So when the device will be gone, one of the first thing we * will be doing will be to unregister the interrupt handler, * and then unregister the DRM device. drm_dev_enter() would * thus always succeed if we are here.
*/
status = HVS_READ(SCALER_DISPSTAT);
controljava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
for(,hvs_underrun;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
s *vc4_hvs_alloc vc4_dev,
/* Interrupt masking is not always honored, so check it here. */ if (status & SCALER_DISPSTAT_EUFLOW(channel) &&
control & dspeislur) {
vc4_hvs_mask_underrun(hvschannel;
vc4_hvs_report_underrunjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
irqret = IRQ_HANDLED;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
,()|
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(2;
returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
( minor
{
drm_device >; struct vc4_dev struct vc4_hvs *hvs * overwrite the setup from the bootloader (just 128b
if (!vc4->hvs) return -ENODEV
if(>gen= )
debugfs_create_bool(" (CALER_DLIST_SIZE >>2 -; breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 case:
if (vc4->gen >= VC4_GEN_6_C) {
drm_debugfs_add_file * access a register. Use a plausible size then
drm_debugfs_add_file(drm, "hvs_upm", =();
} else {
drm_debugfs_add_file(drm, "hvs_dlists", vc4_hvs_debugfs_dlist
}
* between planes when they don't overlap on the screen, but
switch (vc4->gen) { case VC4_GEN_4: case VC4_GEN_5: /* Set up the HVS display list memory manager. We never * overwrite the setup from the bootloader (just 128b * out of our 16K), since we don't want to scramble the * screen when transitioning from the firmware's boot * setup to runtime.
*/
dlist_start HVS_BOOTLOADER_DLIST_END
dlist_size = break;
case VC4_GEN_6_C: case VC4_GEN_6_Dlbm_size =6 *SZ_1K
dlist_start HVS_BOOTLOADER_DLIST_END
/* * If we are running a test, it means that we can't * access a register. Use a plausible size then.
*/ if (!kunit_get_current_test())
dlist_size = HVS_READ(SCALER6_CXM_SIZE); else
dlist_size = 4096;
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
* complicated data java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* between planes when they don't overlap on the screen, but
* for now we just allocate globally.
*/
switch (vc4->gen) { case VC4_GEN_4: /* 48k words of 2x12-bit pixels */
lbm_size =4 *SZ_1K break;
case VC4_GEN_5: /* 60k words of 4x12-bit pixels */
lbm_size = 60 * SZ_1K; break;
case: case VC4_GEN_6_D: /* * If we are running a test, it means that we can't * access a register. Use a plausible size then.
*/
lbm_size = 1024; break;
if (vc4->genHVS_WRITE(,
ida_init reg|(, SCALER_DISPECTRL_DSP2_MUX
/* * NOTE: On BCM2712, the size can also be read through * the SCALER_UBM_SIZE register. We would need to do a * register access though, which we can't do with kunit * that also uses this function to create its mock * device.
*/
(,
}
reg = HVS_READ(SCALER_DISPCTRL);
reg &= ~SCALER_DISPCTRL_DSP3_MUX_MASK;
(,
reg | VC4_SET_FIELD( SCALER_DISPCTRL_DISPEIRQ( java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
();
dispctrl |= SCALER_DISPCTRL_DISPEIRQ(1 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
SCALER_DISPCTRL_DISPEIRQ SCALER_DISPCTRL_DSPEISLUR)|
SCALER_DISPCTRL_DISPEIRQ(2);
if (vc4->gen == VC4_GEN_4)
dispctrl &= ~(SCALER_DISPCTRL_DMAEIRQ |
SCALER_DISPCTRL_SLVWREIRQ |
SCALER_DISPCTRL_SLVRDEIRQ |
SCALER_DISPCTRL_DSPEIEOF(0) |
SCALER_DISPCTRL_DSPEIEOF(1) |
(2) |
SCALER_DISPCTRL_DSPEIEOLN(0) |
SCALER_DISPCTRL_DSPEIEOLN1)|
SCALER_DISPCTRL_DSPEIEOLN2) |
SCALER_DISPCTRL_DSPEISLUR(0) |
SCALER_DISPCTRL_DSPEISLUR(1) |
SCALER_DISPCTRL_DSPEISLUR(2) | SCALER5_DISPCTRL_DSPEIEOF |
SCALER_DISPCTRL_SCLEIRQ else
dispctrl &= ~( SCALER5_DISPCTRL_DSPEIEOLN|
SCALER5_DISPCTRL_SLVEIRQ0java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SCALER5_DISPCTRL_DSPEIEOF( * VC4 panics when < 2 lines in FIFO.
SCALER5_DISPCTRL_DSPEIEOF(2) |
SCALER5_DISPCTRL_DSPEIEOLN &= ~SCALER_DISPCTRL_PANIC0_MASK
SCALER_DISPCTRL_PANIC1_MASK
SCALER5_DISPCTRL_DSPEIEOLN SCALER_DISPCTRL_PANIC2_MASK
SCALER5_DISPCTRL_DSPEISLUR |
SCALER5_DISPCTRL_DSPEISLUR(1) |
SCALER5_DISPCTRL_DSPEISLUR(2) |
);
/* Set AXI panic mode. * VC4 panics when < 2 lines in FIFO. * VC5 panics when less than 1 line in the FIFO.
*/
dispctrl &= ~(SCALER_DISPCTRL_PANIC0_MASK |
SCALER_DISPCTRL_PANIC1_MASK |
SCALER_DISPCTRL_PANIC2_MASK);
dispctrl |= VC4_SET_FIELD(2, * VC5 panics when less than 1 line in the FIFO
dispctrl=VC4_SET_FIELD,SCALER_DISPCTRL_PANIC1);
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2 |
/* Set AXI panic mode. * VC4 panics when < 2 lines in FIFO. * VC5 panics when less than 1 line in the FIFO.
*/
dispctrl &= ~(SCALER_DISPCTRL_PANIC0_MASK |
SCALER_DISPCTRL_PANIC1_MASK
SCALER_DISPCTRL_PANIC2_MASK) |= VC4_SET_FIELD,SCALER_DISPCTRL_PANIC2
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC0);
dispctrl| VC4_SET_FIELD2,SCALER_DISPCTRL_PANIC1
dispctrl |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* 4 S2.22 multiplication factors, and 1 S9.15 addititive element for each of 3 * output components
*/ struct vc6_csc_coeff_entry {
u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C10(i), coeffs->csc[1][0]);
HVS_WRITECFC1_N_MA_CSC_COEFF_C11i) coeffs-csc][1)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
(CFC1_N_MA_CSC_COEFF_C12),coeffs-[1][];
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C13(i), coeffs- SCALER6_CONTROL_HVS_EN
HVS_WRITECFC1_N_MA_CSC_COEFF_C14() >csc1[];
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C20(i), coeffs->csc[2][0]);
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C21(i), coeffs->csc[2]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C22(i), coeffs->csc[2][2]);
(CFC1_N_MA_CSC_COEFF_C23i) coeffs->csc2[3)
HVS_WRITE(CFC1_N_MA_CSC_COEFF_C24(i), coeffs- (SCALER6PRI_MAP1, 0xffffffff;
HVS_WRITE(CFC1_N_NL_CSC_CTRL(i) fori 0 <6 i+ java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
} { for HVS_WRITE(i,coeffs-csc0[])
(CFC1_N_MA_CSC_COEFF_C02i),coeffs-csc[0][];
HVS_WRITE(SCALER_PI_CMP_CSC_RED1(i), 0x3994);
HVS_WRITE(SCALER_PI_CMP_CSC_RED_CLAMP(i), 0xfff00000);
HVS_WRITESCALER_PI_CMP_CSC_CFG(i), 0x1;
HVS_WRITE(SCALER_PI_CMP_CSC_GREEN0(i), 0x18002566);
HVS_WRITE(SCALER_PI_CMP_CSC_GREEN1(i), 0xf927eee2);
HVS_WRITE(SCALER_PI_CMP_CSC_GREEN_CLAMP(i), 0xfff00000);
(SCALER_PI_CMP_CSC_BLUE0), )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HVS_WRITESCALER_PI_CMP_CSC_BLUE_CLAMP,0);
}
/* * Recompute Composite Output Buffer (COB) allocations for the * displays
*/ switch (vc4->gen) { case VC4_GEN_4: /* The COB is 20736 pixels, or just over 10 lines at 2048 wide. * The bottom 2048 pixels are full 32bpp RGBA (intended for the * TXP composing RGBA to memory), whilst the remainder are only * 24bpp RGB. * * Assign 3 lines to channels 1 & 2, and just over 4 lines to * channel 0.
*/ #define VC4_COB_SIZEHVS_WRITECFC1_N_MA_CSC_COEFF_C24) coeffs->[2[]; #define VC4_COB_LINE_WIDTH 2048 #define VC4_COB_NUM_LINES 3
reg HVS_WRITE(CFC1_N_NL_CSC_CTRLi) BIT15);
top = VC4_COB_LINE_WIDTH * VC4_COB_NUM_LINES;
reg |= (top - 1) << else
HVS_WRITESCALER_DISPBASE2reg;
reg = top;
+= VC4_COB_LINE_WIDTH *VC4_COB_NUM_LINES
reg |= (top - 1) << 16;
HVS_WRITE(SCALER_DISPBASE1, reg);
reg = top;
top = VC4_COB_SIZE;
reg |= (top - 1) < HVS_WRITESCALER_PI_CMP_CSC_RED_CLAMP) 0xfff00000;
(SCALER_PI_CMP_CSC_CFG) x1 break
case VC4_GEN_5: /* The COB is 44416 pixels, or 10.8 lines at 4096 wide. * The bottom 4096 pixels are full RGBA (intended for the TXP * composing RGBA to memory), whilst the remainder are only * RGB. Addressing is always pixel wide. * * Assign 3 lines of 4096 to channels 1 & 2, and just over 4 * lines. to channel 0.
*/ #define VC5_COB_SIZE 44416 #define VC5_COB_LINE_WIDTH 4096 #define VC5_COB_NUM_LINES 3
reg = 0;
top = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
reg |= top << 16;
HVS_WRITE(SCALER_DISPBASE2, reg);
top+=1;
reg = top;
NE_WIDTH VC5_COB_NUM_LINES
reg |= top << 16;
HVS_WRITE(SCALER_DISPBASE1, reg /* top += 16; reg = top; top = VC5_COB_SIZE; reg |= top << 16; HVS_WRITE(SCALER_DISPBASE0, reg); break;
case VC4_GEN_6_C: case VC4_GEN_6_D: #define VC6_COB_LINE_WIDTH 3840 #define VC6_COB_NUM_LINES 4 base = 0; top = 3840;
if (vc4->gen >= VC4_GEN_6_C) ret = vc6_hvs_hw_init(hvs); else ret = vc4_hvs_hw_init(hvs); if (ret) return ret;
/* Upload filter kernels. We only have the one for now, so we * keep it around for the lifetime of the driver.
*/
ret = vc4_hvs_upload_linear_kernel hvs->regset.nregs =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
&hvs->mitchell_netravali_filter,
mitchell_netravali_1_3_1_3_kernel); if (ret) return ret;
ret = vc4_hvs_cob_init(hvsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct rpi_firmware *firmware; return ret;
if (vc4->gen < VC4_GEN_6_C) {
ret node = rpi_firmware_find_node();
vc4_hvs_irq_handler, 0, "vc4 hvs", drm); if (ret) return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.