Skip to content

Commit 481eff0

Browse files
committed
media: qcom: camss: vfe: Add MSM8939 VBIF settings
Add MSM8939 specific VFE VBIF settings. This fixes black stripes in camera sensor output and garbage in CSID test pattern generator. Signed-off-by: Vincent Knecht <[email protected]>
1 parent 87223db commit 481eff0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/media/platform/qcom/camss/camss-vfe-4-1.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "camss.h"
1616
#include "camss-vfe.h"
1717
#include "camss-vfe-gen1.h"
18+
#include "camss-vfe-vbif.h"
1819

1920
#define VFE_0_HW_VERSION 0x000
2021

@@ -207,6 +208,9 @@
207208
#define CAMIF_TIMEOUT_SLEEP_US 1000
208209
#define CAMIF_TIMEOUT_ALL_US 1000000
209210

211+
#define VBIF_FIXED_SORT_EN 0x30
212+
#define VBIF_FIXED_SORT_SEL0 0x34
213+
210214
#define MSM_VFE_VFE0_UB_SIZE 1023
211215
#define MSM_VFE_VFE0_UB_SIZE_RDI (MSM_VFE_VFE0_UB_SIZE / 3)
212216

@@ -742,6 +746,16 @@ static void vfe_set_qos(struct vfe_device *vfe)
742746
writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_5);
743747
writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_6);
744748
writel_relaxed(val7, vfe->base + VFE_0_BUS_BDG_QOS_CFG_7);
749+
750+
/* SoC-specific VBIF settings */
751+
switch (vfe->camss->res->version) {
752+
case CAMSS_8x39:
753+
vfe_vbif_reg_write(vfe, VBIF_FIXED_SORT_EN, 0x00000fff);
754+
vfe_vbif_reg_write(vfe, VBIF_FIXED_SORT_SEL0, 0x00555000);
755+
break;
756+
default:
757+
break;
758+
}
745759
}
746760

747761
static void vfe_set_ds(struct vfe_device *vfe)

drivers/media/platform/qcom/camss/camss.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ static const struct camss_subdev_resources vfe_res_8x39[] = {
288288
.interrupt = { "vfe0" },
289289
.vfe = {
290290
.line_num = 3,
291+
.has_vbif = true,
292+
.vbif_name = "vfe0_vbif",
291293
.hw_ops = &vfe_ops_4_1,
292294
.formats_rdi = &vfe_formats_rdi_8x16,
293295
.formats_pix = &vfe_formats_pix_8x16

0 commit comments

Comments
 (0)