diff options
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-cpmem.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c index c55f3620e84a..3bf05bc4ab67 100644 --- a/drivers/gpu/ipu-v3/ipu-cpmem.c +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c | |||
@@ -674,6 +674,69 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image) | |||
674 | } | 674 | } |
675 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_image); | 675 | EXPORT_SYMBOL_GPL(ipu_cpmem_set_image); |
676 | 676 | ||
677 | void ipu_cpmem_dump(struct ipuv3_channel *ch) | ||
678 | { | ||
679 | struct ipu_ch_param __iomem *p = ipu_get_cpmem(ch); | ||
680 | struct ipu_soc *ipu = ch->ipu; | ||
681 | int chno = ch->num; | ||
682 | |||
683 | dev_dbg(ipu->dev, "ch %d word 0 - %08X %08X %08X %08X %08X\n", chno, | ||
684 | readl(&p->word[0].data[0]), | ||
685 | readl(&p->word[0].data[1]), | ||
686 | readl(&p->word[0].data[2]), | ||
687 | readl(&p->word[0].data[3]), | ||
688 | readl(&p->word[0].data[4])); | ||
689 | dev_dbg(ipu->dev, "ch %d word 1 - %08X %08X %08X %08X %08X\n", chno, | ||
690 | readl(&p->word[1].data[0]), | ||
691 | readl(&p->word[1].data[1]), | ||
692 | readl(&p->word[1].data[2]), | ||
693 | readl(&p->word[1].data[3]), | ||
694 | readl(&p->word[1].data[4])); | ||
695 | dev_dbg(ipu->dev, "PFS 0x%x, ", | ||
696 | ipu_ch_param_read_field(ch, IPU_FIELD_PFS)); | ||
697 | dev_dbg(ipu->dev, "BPP 0x%x, ", | ||
698 | ipu_ch_param_read_field(ch, IPU_FIELD_BPP)); | ||
699 | dev_dbg(ipu->dev, "NPB 0x%x\n", | ||
700 | ipu_ch_param_read_field(ch, IPU_FIELD_NPB)); | ||
701 | |||
702 | dev_dbg(ipu->dev, "FW %d, ", | ||
703 | ipu_ch_param_read_field(ch, IPU_FIELD_FW)); | ||
704 | dev_dbg(ipu->dev, "FH %d, ", | ||
705 | ipu_ch_param_read_field(ch, IPU_FIELD_FH)); | ||
706 | dev_dbg(ipu->dev, "EBA0 0x%x\n", | ||
707 | ipu_ch_param_read_field(ch, IPU_FIELD_EBA0) << 3); | ||
708 | dev_dbg(ipu->dev, "EBA1 0x%x\n", | ||
709 | ipu_ch_param_read_field(ch, IPU_FIELD_EBA1) << 3); | ||
710 | dev_dbg(ipu->dev, "Stride %d\n", | ||
711 | ipu_ch_param_read_field(ch, IPU_FIELD_SL)); | ||
712 | dev_dbg(ipu->dev, "scan_order %d\n", | ||
713 | ipu_ch_param_read_field(ch, IPU_FIELD_SO)); | ||
714 | dev_dbg(ipu->dev, "uv_stride %d\n", | ||
715 | ipu_ch_param_read_field(ch, IPU_FIELD_SLUV)); | ||
716 | dev_dbg(ipu->dev, "u_offset 0x%x\n", | ||
717 | ipu_ch_param_read_field(ch, IPU_FIELD_UBO) << 3); | ||
718 | dev_dbg(ipu->dev, "v_offset 0x%x\n", | ||
719 | ipu_ch_param_read_field(ch, IPU_FIELD_VBO) << 3); | ||
720 | |||
721 | dev_dbg(ipu->dev, "Width0 %d+1, ", | ||
722 | ipu_ch_param_read_field(ch, IPU_FIELD_WID0)); | ||
723 | dev_dbg(ipu->dev, "Width1 %d+1, ", | ||
724 | ipu_ch_param_read_field(ch, IPU_FIELD_WID1)); | ||
725 | dev_dbg(ipu->dev, "Width2 %d+1, ", | ||
726 | ipu_ch_param_read_field(ch, IPU_FIELD_WID2)); | ||
727 | dev_dbg(ipu->dev, "Width3 %d+1, ", | ||
728 | ipu_ch_param_read_field(ch, IPU_FIELD_WID3)); | ||
729 | dev_dbg(ipu->dev, "Offset0 %d, ", | ||
730 | ipu_ch_param_read_field(ch, IPU_FIELD_OFS0)); | ||
731 | dev_dbg(ipu->dev, "Offset1 %d, ", | ||
732 | ipu_ch_param_read_field(ch, IPU_FIELD_OFS1)); | ||
733 | dev_dbg(ipu->dev, "Offset2 %d, ", | ||
734 | ipu_ch_param_read_field(ch, IPU_FIELD_OFS2)); | ||
735 | dev_dbg(ipu->dev, "Offset3 %d\n", | ||
736 | ipu_ch_param_read_field(ch, IPU_FIELD_OFS3)); | ||
737 | } | ||
738 | EXPORT_SYMBOL_GPL(ipu_cpmem_dump); | ||
739 | |||
677 | int ipu_cpmem_init(struct ipu_soc *ipu, struct device *dev, unsigned long base) | 740 | int ipu_cpmem_init(struct ipu_soc *ipu, struct device *dev, unsigned long base) |
678 | { | 741 | { |
679 | struct ipu_cpmem *cpmem; | 742 | struct ipu_cpmem *cpmem; |