vc4_crtc
struct vc4_crtc crtc;
struct vc4_crtc *vc4_crtc;
vc4_crtc = &dummy_crtc->crtc;
vc4_crtc, data, plane,
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
const struct vc4_crtc_data *crtc_data = vc4_crtc_to_vc4_crtc_data(vc4_crtc);
&vc4_crtc->regset);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc);
struct vc4_crtc *vc4_crtc,
struct drm_crtc *crtc = &vc4_crtc->base;
vc4_crtc->data = data;
vc4_crtc->pdev = pdev;
vc4_crtc->feeds_txp = feeds_txp;
spin_lock_init(&vc4_crtc->irq_lock);
drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r));
vc4_crtc->lut_r[i] = i;
vc4_crtc->lut_g[i] = i;
vc4_crtc->lut_b[i] = i;
struct vc4_crtc *vc4_crtc,
return __vc4_crtc_init(drm, pdev, vc4_crtc, data, primary_plane,
struct vc4_crtc *vc4_crtc;
vc4_crtc = drmm_kzalloc(drm, sizeof(*vc4_crtc), GFP_KERNEL);
if (!vc4_crtc)
crtc = &vc4_crtc->base;
vc4_crtc->regs = vc4_ioremap_regs(pdev, 0);
if (IS_ERR(vc4_crtc->regs))
return PTR_ERR(vc4_crtc->regs);
vc4_crtc->regset.base = vc4_crtc->regs;
vc4_crtc->regset.regs = crtc_regs;
vc4_crtc->regset.nregs = ARRAY_SIZE(crtc_regs);
ret = vc4_crtc_init(drm, pdev, vc4_crtc, &pv_data->base,
"vc4 crtc", vc4_crtc);
platform_set_drvdata(pdev, vc4_crtc);
struct vc4_crtc *vc4_crtc = dev_get_drvdata(dev);
*stime = vc4_crtc->t_vblank;
*etime = vc4_crtc->t_vblank;
static u32 vc4_get_fifo_full_level(struct vc4_crtc *vc4_crtc, u32 format)
const struct vc4_crtc_data *crtc_data = vc4_crtc_to_vc4_crtc_data(vc4_crtc);
const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc);
struct vc4_dev *vc4 = to_vc4_dev(vc4_crtc->base.dev);
static u32 vc4_crtc_get_fifo_full_level_bits(struct vc4_crtc *vc4_crtc,
u32 level = vc4_get_fifo_full_level(vc4_crtc, format);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
const struct vc4_pv_data *pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc);
struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev);
dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs before:\n",
drm_print_regset32(&p, &vc4_crtc->regset);
vc4_crtc_get_fifo_full_level_bits(vc4_crtc, format) |
struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev);
dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs after:\n",
drm_print_regset32(&p, &vc4_crtc->regset);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
if (!(of_device_is_compatible(vc4_crtc->pdev->dev.of_node,
of_device_is_compatible(vc4_crtc->pdev->dev.of_node,
of_device_is_compatible(vc4_crtc->pdev->dev.of_node,
of_device_is_compatible(vc4_crtc->pdev->dev.of_node,
writel(val, vc4_crtc->regs + (offset)); \
channel = vc4_hvs_get_fifo_from_output(vc4->hvs, vc4_crtc->data->hvs_output);
pv_data = vc4_crtc_to_vc4_pv_data(vc4_crtc);
readl(vc4_crtc->regs + (offset)); \
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc)
struct drm_crtc *crtc = &vc4_crtc->base;
u32 chan = vc4_crtc->current_hvs_channel;
spin_lock(&vc4_crtc->irq_lock);
if (vc4_crtc->event &&
(vc4_crtc->current_dlist == current_dlist || vc4_crtc->feeds_txp)) {
drm_crtc_send_vblank_event(crtc, vc4_crtc->event);
vc4_crtc->event = NULL;
spin_unlock(&vc4_crtc->irq_lock);
void vc4_crtc_handle_vblank(struct vc4_crtc *crtc)
struct vc4_crtc *vc4_crtc = data;
vc4_crtc_handle_vblank(vc4_crtc);
container_of_const(_crtc, struct vc4_crtc, base)
vc4_crtc_to_vc4_crtc_data(const struct vc4_crtc *crtc)
vc4_crtc_to_vc4_pv_data(const struct vc4_crtc *crtc)
struct vc4_crtc *vc4_crtc, const struct vc4_crtc_data *data,
struct vc4_crtc *vc4_crtc, const struct vc4_crtc_data *data,
void vc4_crtc_handle_vblank(struct vc4_crtc *crtc);
vc4_hvs_update_gamma_lut(hvs, vc4_crtc);
struct vc4_crtc *vc4_crtc)
struct drm_crtc *crtc = &vc4_crtc->base;
HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_r[i]);
HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_g[i]);
HVS_WRITE(SCALER_GAMDATA, vc4_crtc->lut_b[i]);
struct vc4_crtc *vc4_crtc)
struct drm_crtc_state *crtc_state = vc4_crtc->base.state;
vc4_crtc->lut_r[i] = drm_color_lut_extract(lut[i].red, 8);
vc4_crtc->lut_g[i] = drm_color_lut_extract(lut[i].green, 8);
vc4_crtc->lut_b[i] = drm_color_lut_extract(lut[i].blue, 8);
vc4_hvs_lut_load(hvs, vc4_crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
vc4_hvs_lut_load(hvs, vc4_crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
if (!vc4_crtc->feeds_txp || vc4_state->txp_armed) {
vc4_crtc->event = crtc->state->event;
spin_lock_irqsave(&vc4_crtc->irq_lock, flags);
vc4_crtc->current_dlist = vc4_state->mm.start;
spin_unlock_irqrestore(&vc4_crtc->irq_lock, flags);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
spin_lock_irqsave(&vc4_crtc->irq_lock, flags);
vc4_crtc->current_hvs_channel = vc4_state->assigned_channel;
spin_unlock_irqrestore(&vc4_crtc->irq_lock, flags);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
bool oneshot = vc4_crtc->feeds_txp;
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
if (vc4_crtc->feeds_txp)
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
switch (vc4_crtc->data->hvs_output) {
const struct vc4_crtc *crtc_a =
const struct vc4_crtc *crtc_b =
struct vc4_crtc *vc4_crtc;
vc4_crtc = to_vc4_crtc(crtc);
matching_channels = unassigned_channels & vc4_crtc->data->hvs_available_channels;
struct vc4_crtc base;
struct vc4_crtc *vc4_crtc = &txp->base;
vc4_crtc_handle_vblank(vc4_crtc);
struct vc4_crtc *vc4_crtc;
vc4_crtc = &txp->base;
vc4_crtc->regset.base = txp->regs;
vc4_crtc->regset.regs = txp_regs;
vc4_crtc->regset.nregs = ARRAY_SIZE(txp_regs);
ret = vc4_crtc_init(drm, pdev, vc4_crtc, &txp_data->base,
encoder->possible_crtcs = drm_crtc_mask(&vc4_crtc->base);