1
0
Fork 0
mirror of https://gitlab.postmarketos.org/postmarketOS/pmaports.git synced 2025-07-16 10:15:09 +03:00
pmaports/temp/libcamera/0003-libcamera-simple-Force-disable-softwareISP-for-milli.patch
Robert Mader 5677fe9d6d
temp/libcamera: upgrade to 0.5.1
See
https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.5.1

Additional changes:
 - Adopt build to commit "ipa: Move IPA installations to a subdir"
 - Backport a fix for the simple pipeline

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6608
[ci:skip-build]: already built successfully in CI
2025-06-05 12:42:12 +02:00

43 lines
1.3 KiB
Diff

From 8dd00d27c62b43076534c2876db60e3ebc982320 Mon Sep 17 00:00:00 2001
From: Robert Mader <robert.mader@collabora.com>
Date: Thu, 9 May 2024 21:07:07 +0200
Subject: [PATCH 03/13] libcamera: simple: Force-disable softwareISP for
millipixels
As the later uses libcamera and requires raw-streams to get passed
through. In the future, libcamera will likely support both - raw and
swIsp - at the same time.
---
src/libcamera/pipeline/simple/simple.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 74e0683f4..eb405e52c 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -7,6 +7,7 @@
*/
#include <algorithm>
+#include <fstream>
#include <iterator>
#include <list>
#include <map>
@@ -1680,6 +1681,14 @@ bool SimplePipelineHandler::matchDevice(MediaDevice *media,
swIspEnabled_ = info.swIspEnabled;
+ std::string comm_string;
+ std::ifstream("/proc/self/comm") >> comm_string;
+ if (comm_string == "millipixels") {
+ LOG(SimplePipeline, Warning)
+ << "Detected millipixels, disabling swIsp";
+ swIspEnabled_ = false;
+ }
+
/* Locate the sensors. */
std::vector<MediaEntity *> sensors = locateSensors(media);
if (sensors.empty()) {
--
2.49.0