summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-21 00:16:02 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-07-24 19:03:52 +0200
commita2a6f95bffcff24869f24d94b94247ebc05f448c (patch)
tree8b84ea250185c4f70bed0696b6b168a93877670c
parent3312af649a28607f6718afdbd819aa5b70e11891 (diff)
android: camera_device: Add ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS
Define the ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS to zero to inform users the HAL does not support any reprocessing. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/android/camera_device.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index d9fdaf44..b49d6681 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -370,8 +370,8 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
* \todo Keep this in sync with the actual number of entries.
* Currently: 50 entries, 647 bytes of static metadata
*/
- uint32_t numEntries = 49;
- uint32_t byteSize = 647;
+ uint32_t numEntries = 50;
+ uint32_t byteSize = 651;
/*
* Calculate space occupation in bytes for dynamically built metadata
@@ -699,6 +699,11 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
staticMetadata_->addEntry(ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
&maxPipelineDepth, 1);
+ /* LIMITED does not support reprocessing. */
+ uint32_t maxNumInputStreams = 0;
+ staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
+ &maxNumInputStreams, 1);
+
std::vector<uint8_t> availableCapabilities = {
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE,
};
@@ -752,6 +757,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,
ANDROID_REQUEST_PARTIAL_RESULT_COUNT,
ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
+ ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES,
};
staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
180'>180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2021, Ideas on Board Oy
 *
 * drm.h - DRM/KMS Helpers
 */
#ifndef __CAM_DRM_H__
#define __CAM_DRM_H__

#include <list>
#include <map>
#include <memory>
#include <string>
#include <vector>

#include <libcamera/base/signal.h>
#include <libcamera/base/span.h>

#include <libdrm/drm.h>
#include <xf86drm.h>
#include <xf86drmMode.h>

namespace libcamera {
class FrameBuffer;
class PixelFormat;
class Size;
} /* namespace libcamera */

namespace DRM {

class Device;
class Plane;
class Property;
class PropertyValue;

class Object
{
public:
	enum Type {
		TypeCrtc = DRM_MODE_OBJECT_CRTC,
		TypeConnector = DRM_MODE_OBJECT_CONNECTOR,
		TypeEncoder = DRM_MODE_OBJECT_ENCODER,
		TypeMode = DRM_MODE_OBJECT_MODE,
		TypeProperty = DRM_MODE_OBJECT_PROPERTY,
		TypeFb = DRM_MODE_OBJECT_FB,
		TypeBlob = DRM_MODE_OBJECT_BLOB,
		TypePlane = DRM_MODE_OBJECT_PLANE,
		TypeAny = DRM_MODE_OBJECT_ANY,
	};

	Object(Device *dev, uint32_t id, Type type);
	virtual ~Object();

	Device *device() const { return dev_; }
	uint32_t id() const { return id_; }
	Type type() const { return type_; }

	const Property *property(const std::string &name) const;
	const PropertyValue *propertyValue(const std::string &name) const;
	const std::vector<PropertyValue> &properties() const { return properties_; }

protected:
	virtual int setup()
	{
		return 0;
	}

	uint32_t id_;

private:
	friend Device;