Loading drivers/media/platform/msm/vidc/hfi_response_handler.c +21 −17 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ static enum msm_vidc_pixel_depth get_hal_pixel_depth(u32 hfi_bit_depth) { switch (hfi_bit_depth) { case HFI_BITDEPTH_8: return MSM_VIDC_BIT_DEPTH_8; case HFI_BITDEPTH_9: case HFI_BITDEPTH_10: return MSM_VIDC_BIT_DEPTH_10; } dprintk(VIDC_ERR, "Unsupported bit depth: %d\n", hfi_bit_depth); Loading @@ -104,7 +105,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, struct hfi_bit_depth *pixel_depth; u8 *data_ptr; int prop_id; u8 luma_bit_depth = 0, chroma_bit_depth = 0; enum msm_vidc_pixel_depth luma_bit_depth, chroma_bit_depth; if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, Loading Loading @@ -160,28 +161,31 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, pixel_depth = (struct hfi_bit_depth *) data_ptr; /* * Luma and chroma can have different bitdepths. * Driver will rely only on luma bitdepth for * determining output bitdepth type. * Driver should rely on luma and chroma * bitdepth for determining output bitdepth * type. * * pixel_depth->bitdepth will include luma * bitdepth info in bits 0..15 and chroma * bitdept in bits 16..31. */ luma_bit_depth = pixel_depth->bit_depth & GENMASK(15, 0); event_notify.bit_depth = get_hal_pixel_depth(luma_bit_depth); dprintk(VIDC_DBG, "luma bitdepth: %d\n", event_notify.bit_depth); chroma_bit_depth = luma_bit_depth = get_hal_pixel_depth( pixel_depth->bit_depth & GENMASK(31, 16); if (get_hal_pixel_depth(chroma_bit_depth) != event_notify.bit_depth) dprintk(VIDC_WARN, "chroma_bit_depth(%d) != luma_bit_depth(%d)\n", chroma_bit_depth, luma_bit_depth); GENMASK(15, 0)); chroma_bit_depth = get_hal_pixel_depth( (pixel_depth->bit_depth & GENMASK(31, 16)) >> 16); if (luma_bit_depth == MSM_VIDC_BIT_DEPTH_10 || chroma_bit_depth == MSM_VIDC_BIT_DEPTH_10) event_notify.bit_depth = MSM_VIDC_BIT_DEPTH_10; else event_notify.bit_depth = luma_bit_depth; dprintk(VIDC_DBG, "bitdepth(%d), luma_bit_depth(%d), chroma_bit_depth(%d)\n", event_notify.bit_depth, luma_bit_depth, chroma_bit_depth); data_ptr += sizeof(struct hfi_bit_depth); break; default: Loading drivers/media/platform/msm/vidc/venus_hfi.c +1 −0 Original line number Diff line number Diff line Loading @@ -1125,6 +1125,7 @@ static int __unset_imem(struct venus_hfi_device *device) rc = __core_in_valid_state(device); if (!rc) { dprintk(VIDC_WARN, "Core is in bad state, won't unset imem\n"); rc = -EINVAL; goto imem_unset_failed; } Loading Loading
drivers/media/platform/msm/vidc/hfi_response_handler.c +21 −17 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ static enum msm_vidc_pixel_depth get_hal_pixel_depth(u32 hfi_bit_depth) { switch (hfi_bit_depth) { case HFI_BITDEPTH_8: return MSM_VIDC_BIT_DEPTH_8; case HFI_BITDEPTH_9: case HFI_BITDEPTH_10: return MSM_VIDC_BIT_DEPTH_10; } dprintk(VIDC_ERR, "Unsupported bit depth: %d\n", hfi_bit_depth); Loading @@ -104,7 +105,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, struct hfi_bit_depth *pixel_depth; u8 *data_ptr; int prop_id; u8 luma_bit_depth = 0, chroma_bit_depth = 0; enum msm_vidc_pixel_depth luma_bit_depth, chroma_bit_depth; if (sizeof(struct hfi_msg_event_notify_packet) > pkt->size) { dprintk(VIDC_ERR, Loading Loading @@ -160,28 +161,31 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id, pixel_depth = (struct hfi_bit_depth *) data_ptr; /* * Luma and chroma can have different bitdepths. * Driver will rely only on luma bitdepth for * determining output bitdepth type. * Driver should rely on luma and chroma * bitdepth for determining output bitdepth * type. * * pixel_depth->bitdepth will include luma * bitdepth info in bits 0..15 and chroma * bitdept in bits 16..31. */ luma_bit_depth = pixel_depth->bit_depth & GENMASK(15, 0); event_notify.bit_depth = get_hal_pixel_depth(luma_bit_depth); dprintk(VIDC_DBG, "luma bitdepth: %d\n", event_notify.bit_depth); chroma_bit_depth = luma_bit_depth = get_hal_pixel_depth( pixel_depth->bit_depth & GENMASK(31, 16); if (get_hal_pixel_depth(chroma_bit_depth) != event_notify.bit_depth) dprintk(VIDC_WARN, "chroma_bit_depth(%d) != luma_bit_depth(%d)\n", chroma_bit_depth, luma_bit_depth); GENMASK(15, 0)); chroma_bit_depth = get_hal_pixel_depth( (pixel_depth->bit_depth & GENMASK(31, 16)) >> 16); if (luma_bit_depth == MSM_VIDC_BIT_DEPTH_10 || chroma_bit_depth == MSM_VIDC_BIT_DEPTH_10) event_notify.bit_depth = MSM_VIDC_BIT_DEPTH_10; else event_notify.bit_depth = luma_bit_depth; dprintk(VIDC_DBG, "bitdepth(%d), luma_bit_depth(%d), chroma_bit_depth(%d)\n", event_notify.bit_depth, luma_bit_depth, chroma_bit_depth); data_ptr += sizeof(struct hfi_bit_depth); break; default: Loading
drivers/media/platform/msm/vidc/venus_hfi.c +1 −0 Original line number Diff line number Diff line Loading @@ -1125,6 +1125,7 @@ static int __unset_imem(struct venus_hfi_device *device) rc = __core_in_valid_state(device); if (!rc) { dprintk(VIDC_WARN, "Core is in bad state, won't unset imem\n"); rc = -EINVAL; goto imem_unset_failed; } Loading