Skip to content

Commit 8d60b36

Browse files
author
lance.zhou
committed
Revert "msm: implement f4l2_try_fmt"
This reverts commit 4f95f70.
1 parent 54eb7b8 commit 8d60b36

File tree

10 files changed

+7
-145
lines changed

10 files changed

+7
-145
lines changed

arch/arm64/configs/sagit_user_defconfig

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
600600
# CONFIG_CPU_BOOST is not set
601601
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
602602
# CONFIG_CPU_INPUT_BOOST is not set
603+
CONFIG_INPUT_BOOST_DURATION_MS=40
604+
CONFIG_WAKE_BOOST_DURATION_MS=1000
605+
CONFIG_INPUT_BOOST_FREQ_LP=960000
606+
CONFIG_INPUT_BOOST_FREQ_PERF=300000
603607

604608
#
605609
# CPU frequency scaling drivers
@@ -4630,16 +4634,8 @@ CONFIG_RPCSEC_GSS_KRB5=y
46304634
CONFIG_SUNRPC_DEBUG=y
46314635
# CONFIG_CEPH_FS is not set
46324636
CONFIG_CIFS=y
4633-
# CONFIG_CIFS_STATS is not set
4634-
# CONFIG_CIFS_WEAK_PW_HASH is not set
4635-
# CONFIG_CIFS_UPCALL is not set
4636-
# CONFIG_CIFS_XATTR is not set
4637-
CONFIG_CIFS_DEBUG=y
4638-
# CONFIG_CIFS_DEBUG2 is not set
4639-
# CONFIG_CIFS_DFS_UPCALL is not set
46404637
CONFIG_CIFS_SMB2=y
46414638
CONFIG_CIFS_SMB311=y
4642-
# CONFIG_CIFS_FSCACHE is not set
46434639
# CONFIG_NCP_FS is not set
46444640
# CONFIG_CODA_FS is not set
46454641
# CONFIG_AFS_FS is not set

drivers/media/platform/msm/vidc/msm_v4l2_vidc.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ static int msm_v4l2_querycap(struct file *filp, void *fh,
9191
return msm_vidc_querycap((void *)vidc_inst, cap);
9292
}
9393

94-
static int msm_v4l2_try_fmt(struct file *filp, void *fh,
95-
struct v4l2_format *f)
96-
{
97-
struct msm_vidc_inst *vidc_inst = get_vidc_inst(filp, fh);
98-
return msm_vidc_try_fmt((void *)vidc_inst, f);
99-
}
100-
10194
int msm_v4l2_enum_fmt(struct file *file, void *fh,
10295
struct v4l2_fmtdesc *f)
10396
{
@@ -253,8 +246,6 @@ static const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = {
253246
.vidioc_s_fmt_vid_out_mplane = msm_v4l2_s_fmt,
254247
.vidioc_g_fmt_vid_cap_mplane = msm_v4l2_g_fmt,
255248
.vidioc_g_fmt_vid_out_mplane = msm_v4l2_g_fmt,
256-
.vidioc_try_fmt_vid_cap_mplane = msm_v4l2_try_fmt,
257-
.vidioc_try_fmt_vid_out_mplane = msm_v4l2_try_fmt,
258249
.vidioc_reqbufs = msm_v4l2_reqbufs,
259250
.vidioc_prepare_buf = msm_v4l2_prepare_buf,
260251
.vidioc_qbuf = msm_v4l2_qbuf,

drivers/media/platform/msm/vidc/msm_vdec.c

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,61 +1225,6 @@ static int set_default_properties(struct msm_vidc_inst *inst)
12251225
return rc;
12261226
}
12271227

1228-
static const struct msm_vidc_format *
1229-
vdec_try_fmt_common(struct msm_vidc_inst *inst, struct v4l2_format *f)
1230-
{
1231-
struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
1232-
struct v4l2_plane_pix_format *pfmt = pixmp->plane_fmt;
1233-
const struct msm_vidc_format *fmt;
1234-
u32 szimage;
1235-
1236-
memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved));
1237-
memset(pixmp->reserved, 0, sizeof(pixmp->reserved));
1238-
1239-
fmt = msm_comm_get_pixel_fmt_fourcc(vdec_formats, ARRAY_SIZE(vdec_formats), pixmp->pixelformat, f->type);
1240-
if (!fmt) {
1241-
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
1242-
pixmp->pixelformat = V4L2_PIX_FMT_NV12;
1243-
else if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
1244-
pixmp->pixelformat = V4L2_PIX_FMT_H264;
1245-
else
1246-
return NULL;
1247-
fmt = msm_comm_get_pixel_fmt_fourcc(vdec_formats, ARRAY_SIZE(vdec_formats), pixmp->pixelformat, f->type);
1248-
if (!fmt)
1249-
return NULL;
1250-
}
1251-
1252-
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
1253-
pixmp->height = ALIGN(pixmp->height, 32);
1254-
1255-
if (pixmp->field == V4L2_FIELD_ANY)
1256-
pixmp->field = V4L2_FIELD_NONE;
1257-
pixmp->num_planes = 1;
1258-
pixmp->flags = 0;
1259-
1260-
szimage = fmt->get_frame_size(0,
1261-
pixmp->height, pixmp->width);
1262-
1263-
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
1264-
unsigned int stride = pixmp->width;
1265-
1266-
pfmt[0].sizeimage = szimage;
1267-
pfmt[0].bytesperline = ALIGN(stride, 128);
1268-
} else {
1269-
pfmt[0].sizeimage = clamp_t(u32, pfmt[0].sizeimage, 0, SZ_8M);
1270-
pfmt[0].sizeimage = max(pfmt[0].sizeimage, szimage);
1271-
pfmt[0].bytesperline = 0;
1272-
}
1273-
1274-
return fmt;
1275-
}
1276-
1277-
int msm_vdec_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
1278-
{
1279-
vdec_try_fmt_common(inst, f);
1280-
return 0;
1281-
}
1282-
12831228
int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
12841229
{
12851230
struct msm_vidc_format *fmt = NULL;

drivers/media/platform/msm/vidc/msm_vdec.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ int msm_vdec_streamon(struct msm_vidc_inst *inst, enum v4l2_buf_type i);
3333
int msm_vdec_streamoff(struct msm_vidc_inst *inst, enum v4l2_buf_type i);
3434
int msm_vdec_cmd(struct msm_vidc_inst *inst, struct v4l2_decoder_cmd *dec);
3535
int msm_vdec_s_parm(struct msm_vidc_inst *inst, struct v4l2_streamparm *a);
36-
int msm_vdec_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f);
3736
const struct vb2_ops *msm_vdec_get_vb2q_ops(void);
3837
void msm_vdec_g_ctrl(struct msm_vidc_ctrl **ctrls, int *num_ctrls);
3938
void msm_vdec_ctrl_sort(void);

drivers/media/platform/msm/vidc/msm_venc.c

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,61 +1541,6 @@ static struct msm_vidc_format venc_formats[] = {
15411541
},
15421542
};
15431543

1544-
static const struct msm_vidc_format *
1545-
venc_try_fmt_common(struct msm_vidc_inst *inst, struct v4l2_format *f)
1546-
{
1547-
struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp;
1548-
struct v4l2_plane_pix_format *pfmt = pixmp->plane_fmt;
1549-
const struct msm_vidc_format *fmt;
1550-
u32 sizeimage;
1551-
1552-
memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved));
1553-
memset(pixmp->reserved, 0, sizeof(pixmp->reserved));
1554-
1555-
fmt = msm_comm_get_pixel_fmt_fourcc(venc_formats, ARRAY_SIZE(venc_formats), pixmp->pixelformat, f->type);
1556-
if (!fmt) {
1557-
if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
1558-
pixmp->pixelformat = V4L2_PIX_FMT_H264;
1559-
else if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
1560-
pixmp->pixelformat = V4L2_PIX_FMT_NV12;
1561-
else
1562-
return NULL;
1563-
fmt = msm_comm_get_pixel_fmt_fourcc(venc_formats, ARRAY_SIZE(venc_formats), pixmp->pixelformat, f->type);
1564-
if (!fmt)
1565-
return NULL;
1566-
}
1567-
1568-
pixmp->width = ALIGN(pixmp->width, 128);
1569-
pixmp->height = ALIGN(pixmp->height, 32);
1570-
1571-
pixmp->width = ALIGN(pixmp->width, 2);
1572-
pixmp->height = ALIGN(pixmp->height, 2);
1573-
1574-
if (pixmp->field == V4L2_FIELD_ANY)
1575-
pixmp->field = V4L2_FIELD_NONE;
1576-
pixmp->num_planes = 1;
1577-
pixmp->flags = 0;
1578-
1579-
sizeimage = fmt->get_frame_size(0,
1580-
pixmp->height, pixmp->width);
1581-
1582-
pfmt[0].sizeimage = max(ALIGN(pfmt[0].sizeimage, SZ_4K), sizeimage);
1583-
1584-
if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
1585-
pfmt[0].bytesperline = ALIGN(pixmp->width, 128);
1586-
else
1587-
pfmt[0].bytesperline = 0;
1588-
1589-
return fmt;
1590-
}
1591-
1592-
int msm_venc_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
1593-
{
1594-
venc_try_fmt_common(inst, f);
1595-
1596-
return 0;
1597-
}
1598-
15991544
static int msm_venc_set_csc(struct msm_vidc_inst *inst)
16001545
{
16011546
int rc = 0;

drivers/media/platform/msm/vidc/msm_venc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ int msm_venc_streamon(struct msm_vidc_inst *inst, enum v4l2_buf_type i);
3232
int msm_venc_streamoff(struct msm_vidc_inst *inst, enum v4l2_buf_type i);
3333
int msm_venc_cmd(struct msm_vidc_inst *inst, struct v4l2_encoder_cmd *enc);
3434
int msm_venc_s_parm(struct msm_vidc_inst *inst, struct v4l2_streamparm *a);
35-
int msm_venc_try_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f);
3635
struct vb2_ops *msm_venc_get_vb2q_ops(void);
3736

3837
#endif

drivers/media/platform/msm/vidc/msm_vidc.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,6 @@ int msm_vidc_querycap(void *instance, struct v4l2_capability *cap)
9696
}
9797
EXPORT_SYMBOL(msm_vidc_querycap);
9898

99-
int msm_vidc_try_fmt(void *instance, struct v4l2_format *f)
100-
{
101-
struct msm_vidc_inst *inst = instance;
102-
103-
if (!inst)
104-
return -EINVAL;
105-
106-
if (inst->session_type == MSM_VIDC_DECODER)
107-
return msm_vdec_try_fmt(inst, f);
108-
else if (inst->session_type == MSM_VIDC_ENCODER)
109-
return msm_venc_try_fmt(instance, f);
110-
return -EINVAL;
111-
}
112-
EXPORT_SYMBOL(msm_vidc_try_fmt);
113-
11499
int msm_vidc_enum_fmt(void *instance, struct v4l2_fmtdesc *f)
115100
{
116101
struct msm_vidc_inst *inst = instance;

drivers/media/v4l2-core/v4l2-ioctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,9 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
10301030
* Drivers MUST fill in device_caps, so check for this and
10311031
* warn if it was forgotten.
10321032
*/
1033+
WARN(!(cap->capabilities & V4L2_CAP_DEVICE_CAPS) ||
1034+
!cap->device_caps, "Bad caps for driver %s, %x %x",
1035+
cap->driver, cap->capabilities, cap->device_caps);
10331036
cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT;
10341037

10351038
return ret;

drivers/platform/msm/ipa/ipa_common

96 Bytes
Binary file not shown.

include/media/msm_vidc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,4 @@ int msm_vidc_unsubscribe_event(void *instance,
122122
const struct v4l2_event_subscription *sub);
123123
int msm_vidc_dqevent(void *instance, struct v4l2_event *event);
124124
int msm_vidc_enum_framesizes(void *instance, struct v4l2_frmsizeenum *fsize);
125-
int msm_vidc_try_fmt(void *instance, struct v4l2_format *f);
126125
#endif

0 commit comments

Comments
 (0)