msm: camera: isp: Add new packer format to support LSB alignment
Add new packer format to support LSB alignment for plain16_10 packer format. CRs-Fixed: 2825675 Change-Id: I401241dc14dc67d3b363d3d39b37aabe716e167c Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
此提交包含在:

提交者
Gerrit - the friendly Code Review server

父節點
37e33fb211
當前提交
2a948f7cc0
@@ -483,6 +483,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
case CAM_FORMAT_DPCM_14_10_14:
|
case CAM_FORMAT_DPCM_14_10_14:
|
||||||
case CAM_FORMAT_PLAIN8:
|
case CAM_FORMAT_PLAIN8:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
case CAM_FORMAT_PLAIN16_14:
|
case CAM_FORMAT_PLAIN16_14:
|
||||||
case CAM_FORMAT_PLAIN16_16:
|
case CAM_FORMAT_PLAIN16_16:
|
||||||
@@ -506,6 +507,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
case CAM_FORMAT_UBWC_TP10:
|
case CAM_FORMAT_UBWC_TP10:
|
||||||
case CAM_FORMAT_UBWC_P010:
|
case CAM_FORMAT_UBWC_P010:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
return 2;
|
return 2;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -518,6 +520,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
case CAM_FORMAT_PLAIN8:
|
case CAM_FORMAT_PLAIN8:
|
||||||
case CAM_FORMAT_TP10:
|
case CAM_FORMAT_TP10:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
return 2;
|
return 2;
|
||||||
case CAM_FORMAT_Y_ONLY:
|
case CAM_FORMAT_Y_ONLY:
|
||||||
return 1;
|
return 1;
|
||||||
@@ -542,6 +545,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
case CAM_FORMAT_ARGB_14:
|
case CAM_FORMAT_ARGB_14:
|
||||||
case CAM_FORMAT_PLAIN8:
|
case CAM_FORMAT_PLAIN8:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
case CAM_FORMAT_PLAIN16_14:
|
case CAM_FORMAT_PLAIN16_14:
|
||||||
return 1;
|
return 1;
|
||||||
@@ -553,6 +557,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
switch (format) {
|
switch (format) {
|
||||||
case CAM_FORMAT_PLAIN8:
|
case CAM_FORMAT_PLAIN8:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
case CAM_FORMAT_PLAIN16_14:
|
case CAM_FORMAT_PLAIN16_14:
|
||||||
return 1;
|
return 1;
|
||||||
@@ -564,6 +569,7 @@ static int cam_vfe_bus_get_num_wm(
|
|||||||
switch (format) {
|
switch (format) {
|
||||||
case CAM_FORMAT_PLAIN16_8:
|
case CAM_FORMAT_PLAIN16_8:
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
case CAM_FORMAT_PLAIN16_14:
|
case CAM_FORMAT_PLAIN16_14:
|
||||||
case CAM_FORMAT_PLAIN16_16:
|
case CAM_FORMAT_PLAIN16_16:
|
||||||
@@ -920,6 +926,7 @@ static enum cam_vfe_bus_packer_format
|
|||||||
case CAM_FORMAT_PLAIN8:
|
case CAM_FORMAT_PLAIN8:
|
||||||
return PACKER_FMT_PLAIN_8;
|
return PACKER_FMT_PLAIN_8;
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
return PACKER_FMT_PLAIN_16_10BPP;
|
return PACKER_FMT_PLAIN_16_10BPP;
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
return PACKER_FMT_PLAIN_16_12BPP;
|
return PACKER_FMT_PLAIN_16_12BPP;
|
||||||
@@ -1022,6 +1029,7 @@ static int cam_vfe_bus_acquire_wm(
|
|||||||
rsrc_data->stride = rsrc_data->width;
|
rsrc_data->stride = rsrc_data->width;
|
||||||
break;
|
break;
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
case CAM_FORMAT_PLAIN16_12:
|
case CAM_FORMAT_PLAIN16_12:
|
||||||
case CAM_FORMAT_PLAIN16_14:
|
case CAM_FORMAT_PLAIN16_14:
|
||||||
case CAM_FORMAT_PLAIN16_16:
|
case CAM_FORMAT_PLAIN16_16:
|
||||||
@@ -1109,6 +1117,20 @@ static int cam_vfe_bus_acquire_wm(
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case CAM_FORMAT_PLAIN16_10_LSB:
|
||||||
|
rsrc_data->pack_fmt |= 0x10;
|
||||||
|
switch (plane) {
|
||||||
|
case PLANE_C:
|
||||||
|
rsrc_data->height /= 2;
|
||||||
|
break;
|
||||||
|
case PLANE_Y:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CAM_ERR(CAM_ISP, "Invalid plane %d", plane);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
rsrc_data->width *= 2;
|
||||||
|
break;
|
||||||
case CAM_FORMAT_PLAIN16_10:
|
case CAM_FORMAT_PLAIN16_10:
|
||||||
switch (plane) {
|
switch (plane) {
|
||||||
case PLANE_C:
|
case PLANE_C:
|
||||||
|
@@ -178,7 +178,8 @@ struct cam_iommu_handle {
|
|||||||
#define CAM_FORMAT_DPCM_12_10_12 46
|
#define CAM_FORMAT_DPCM_12_10_12 46
|
||||||
#define CAM_FORMAT_PLAIN32 47
|
#define CAM_FORMAT_PLAIN32 47
|
||||||
#define CAM_FORMAT_ARGB_16 48
|
#define CAM_FORMAT_ARGB_16 48
|
||||||
#define CAM_FORMAT_MAX 49
|
#define CAM_FORMAT_PLAIN16_10_LSB 49
|
||||||
|
#define CAM_FORMAT_MAX 50
|
||||||
|
|
||||||
/* Pixel Patterns */
|
/* Pixel Patterns */
|
||||||
#define PIXEL_PATTERN_RGRGRG 0x0
|
#define PIXEL_PATTERN_RGRGRG 0x0
|
||||||
|
新增問題並參考
封鎖使用者