Skip to content

Commit

Permalink
media: apple: isp: Show camera presets even for unsupported sensors
Browse files Browse the repository at this point in the history
This makes adding support easier.

Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan authored and jannau committed Nov 19, 2024
1 parent 3aaf037 commit 009fb57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/media/platform/apple/isp/isp-cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ static int isp_ch_cache_sensor_info(struct apple_isp *isp, u32 ch)
print_hex_dump(KERN_INFO, "apple-isp: ch: ", DUMP_PREFIX_NONE, 32, 4,
args, sizeof(*args), false);

for (u32 ps = 0; ps < args->num_presets; ps++) {
isp_ch_get_camera_preset(isp, ch, ps);
}

err = isp_ch_get_sensor_id(isp, ch);
if (err ||
(fmt->id != ISP_IMX248_1820_01 && fmt->id != ISP_IMX558_1921_01)) {
Expand All @@ -221,10 +225,6 @@ static int isp_ch_cache_sensor_info(struct apple_isp *isp, u32 ch)
return -ENODEV;
}

for (u32 ps = 0; ps < args->num_presets; ps++) {
isp_ch_get_camera_preset(isp, ch, ps);
}

exit:
kfree(args);

Expand Down

0 comments on commit 009fb57

Please sign in to comment.