<div dir="ltr"><div dir="ltr">Hi David,<div><br></div><div>Thank you for your patch.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 13 Jan 2022 at 14:16, David Plowman <<a href="mailto:david.plowman@raspberrypi.com">david.plowman@raspberrypi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Now that the sensor is defined to list mbus codes using its native<br>
(untransformed) Bayer order, the method of obtaining it can be<br>
simplified. We don't have to try and reset the flips, we just use the<br>
value directly from the sensor.<br>
<br>
Signed-off-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++-------<br>
1 file changed, 2 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
index 49d7ff23..79cb75c6 100644<br>
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp<br>
@@ -1279,8 +1279,8 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me<br>
* Thirdly, what is the "native" Bayer order, when no transforms are<br>
* applied?<br>
*<br>
- * As part of answering the final question, we reset the camera to<br>
- * no transform at all.<br>
+ * We note that the sensor's cached list of supported formats is<br>
+ * already in the "native" order, with any flips having been undone.<br>
*/<br>
const V4L2Subdevice *sensor = data->sensor_->device();<br>
const struct v4l2_query_ext_ctrl *hflipCtrl = sensor->controlInfo(V4L2_CID_HFLIP);<br>
@@ -1288,11 +1288,6 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me<br>
/* We assume it will support vflips too... */<br>
data->supportsFlips_ = true;<br>
data->flipsAlterBayerOrder_ = hflipCtrl->flags & V4L2_CTRL_FLAG_MODIFY_LAYOUT;<br>
-<br>
- ControlList ctrls(data->sensor_->controls());<br>
- ctrls.set(V4L2_CID_HFLIP, 0);<br>
- ctrls.set(V4L2_CID_VFLIP, 0);<br>
- data->setSensorControls(ctrls);<br>
}<br>
<br>
/* Look for a valid Bayer format. */<br>
-- <br>
2.30.2<br>
<br>
</blockquote></div></div>