Skip to content

Commit d7ed3bd

Browse files
hoshinolinamarcan
authored andcommitted
media: apple: isp: t8112 fixes...
Signed-off-by: Asahi Lina <[email protected]>
1 parent 7d3ef0f commit d7ed3bd

5 files changed

Lines changed: 16 additions & 7 deletions

File tree

drivers/media/platform/apple/isp/isp-cam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static int isp_ch_configure_capture(struct apple_isp *isp, u32 ch)
346346
return err;
347347
}
348348

349-
if (isp->hw->gen >= ISP_GEN_T8112) {
349+
if (isp->hw->lpdp) {
350350
err = isp_cmd_ch_lpdp_hs_receiver_tuning_set(isp, ch, 1, 15);
351351
if (err)
352352
return err;
@@ -395,7 +395,7 @@ static int isp_ch_configure_capture(struct apple_isp *isp, u32 ch)
395395
if (err)
396396
return err;
397397

398-
err = isp_cmd_apple_ch_temporal_filter_start(isp, ch);
398+
err = isp_cmd_apple_ch_temporal_filter_start(isp, ch, isp->hw->temporal_filter);
399399
if (err)
400400
return err;
401401

drivers/media/platform/apple/isp/isp-cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@ int isp_cmd_ch_buffer_pool_return(struct apple_isp *isp, u32 chan)
416416
return CISP_SEND_IN(isp, args);
417417
}
418418

419-
int isp_cmd_apple_ch_temporal_filter_start(struct apple_isp *isp, u32 chan)
419+
int isp_cmd_apple_ch_temporal_filter_start(struct apple_isp *isp, u32 chan, u32 arg)
420420
{
421421
struct cmd_apple_ch_temporal_filter_start args = {
422422
.opcode = CISP_OPCODE(CISP_CMD_APPLE_CH_TEMPORAL_FILTER_START),
423423
.chan = chan,
424424
.unk_c = 1,
425-
.unk_10 = 0,
425+
.unk_10 = arg,
426426
};
427427
return CISP_SEND_IN(isp, args);
428428
}

drivers/media/platform/apple/isp/isp-cmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ struct cmd_apple_ch_temporal_filter_disable {
577577
} __packed;
578578
static_assert(sizeof(struct cmd_apple_ch_temporal_filter_disable) == 0xc);
579579

580-
int isp_cmd_apple_ch_temporal_filter_start(struct apple_isp *isp, u32 chan);
580+
int isp_cmd_apple_ch_temporal_filter_start(struct apple_isp *isp, u32 chan, u32 arg);
581581
int isp_cmd_apple_ch_temporal_filter_stop(struct apple_isp *isp, u32 chan);
582582
int isp_cmd_apple_ch_motion_history_start(struct apple_isp *isp, u32 chan);
583583
int isp_cmd_apple_ch_motion_history_stop(struct apple_isp *isp, u32 chan);

drivers/media/platform/apple/isp/isp-drv.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ static const struct apple_isp_hw apple_isp_hw_t8103 = {
385385
.bandwidth_size = 0x4,
386386

387387
.scl1 = false,
388+
.lpdp = false,
389+
.temporal_filter = 0,
388390
.meta_size = ISP_META_SIZE_T8103,
389391
};
390392

@@ -412,14 +414,15 @@ static const struct apple_isp_hw apple_isp_hw_t6000 = {
412414
.bandwidth_size = 0x8,
413415

414416
.scl1 = false,
417+
.lpdp = false,
418+
.temporal_filter = 0,
415419
.meta_size = ISP_META_SIZE_T8103,
416420
};
417421

418422
static const struct apple_isp_hw apple_isp_hw_t8112 = {
419423
.gen = ISP_GEN_T8112,
420424
.pmu_base = 0x23b704000,
421425

422-
// TODO: verify
423426
.dsid_count = 1,
424427
.dsid_clr_base0 = 0x200f14000,
425428
.dsid_clr_range0 = 0x1000,
@@ -433,7 +436,9 @@ static const struct apple_isp_hw apple_isp_hw_t8112 = {
433436
.bandwidth_bit = 0x0,
434437
.bandwidth_size = 0x8,
435438

436-
.scl1 = true,
439+
.scl1 = false,
440+
.lpdp = false,
441+
.temporal_filter = 1,
437442
.meta_size = ISP_META_SIZE_T8112,
438443
};
439444

@@ -455,6 +460,8 @@ static const struct apple_isp_hw apple_isp_hw_t6020 = {
455460
.bandwidth_size = 0x8,
456461

457462
.scl1 = true,
463+
.lpdp = true,
464+
.temporal_filter = 0,
458465
.meta_size = ISP_META_SIZE_T8112,
459466
};
460467

drivers/media/platform/apple/isp/isp-drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ struct apple_isp_hw {
111111

112112
u32 meta_size;
113113
bool scl1;
114+
bool lpdp;
115+
u32 temporal_filter;
114116
};
115117

116118
enum isp_sensor_id {

0 commit comments

Comments
 (0)