18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) STMicroelectronics SA 2015 48c2ecf20Sopenharmony_ci * Author: Hugues Fruchet <hugues.fruchet@st.com> for STMicroelectronics. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef DELTA_CFG_H 88c2ecf20Sopenharmony_ci#define DELTA_CFG_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define DELTA_FW_VERSION "21.1-3" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define DELTA_MIN_WIDTH 32 138c2ecf20Sopenharmony_ci#define DELTA_MAX_WIDTH 4096 148c2ecf20Sopenharmony_ci#define DELTA_MIN_HEIGHT 32 158c2ecf20Sopenharmony_ci#define DELTA_MAX_HEIGHT 2400 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* DELTA requires a 32x32 pixels alignment for frames */ 188c2ecf20Sopenharmony_ci#define DELTA_WIDTH_ALIGNMENT 32 198c2ecf20Sopenharmony_ci#define DELTA_HEIGHT_ALIGNMENT 32 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define DELTA_DEFAULT_WIDTH DELTA_MIN_WIDTH 228c2ecf20Sopenharmony_ci#define DELTA_DEFAULT_HEIGHT DELTA_MIN_HEIGHT 238c2ecf20Sopenharmony_ci#define DELTA_DEFAULT_FRAMEFORMAT V4L2_PIX_FMT_NV12 248c2ecf20Sopenharmony_ci#define DELTA_DEFAULT_STREAMFORMAT V4L2_PIX_FMT_MJPEG 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define DELTA_MAX_RESO (DELTA_MAX_WIDTH * DELTA_MAX_HEIGHT) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* guard value for number of access units */ 298c2ecf20Sopenharmony_ci#define DELTA_MAX_AUS 10 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* IP perf dependent, can be tuned */ 328c2ecf20Sopenharmony_ci#define DELTA_PEAK_FRAME_SMOOTHING 2 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* 358c2ecf20Sopenharmony_ci * guard output frame count: 368c2ecf20Sopenharmony_ci * - at least 1 frame needed for display 378c2ecf20Sopenharmony_ci * - at worst 21 388c2ecf20Sopenharmony_ci * ( max h264 dpb (16) + 398c2ecf20Sopenharmony_ci * decoding peak smoothing (2) + 408c2ecf20Sopenharmony_ci * user display pipeline (3) ) 418c2ecf20Sopenharmony_ci */ 428c2ecf20Sopenharmony_ci#define DELTA_MIN_FRAME_USER 1 438c2ecf20Sopenharmony_ci#define DELTA_MAX_DPB 16 448c2ecf20Sopenharmony_ci#define DELTA_MAX_FRAME_USER 3 /* platform/use-case dependent */ 458c2ecf20Sopenharmony_ci#define DELTA_MAX_FRAMES (DELTA_MAX_DPB + DELTA_PEAK_FRAME_SMOOTHING +\ 468c2ecf20Sopenharmony_ci DELTA_MAX_FRAME_USER) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#if DELTA_MAX_FRAMES > VIDEO_MAX_FRAME 498c2ecf20Sopenharmony_ci#undef DELTA_MAX_FRAMES 508c2ecf20Sopenharmony_ci#define DELTA_MAX_FRAMES (VIDEO_MAX_FRAME) 518c2ecf20Sopenharmony_ci#endif 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* extra space to be allocated to store codec specific data per frame */ 548c2ecf20Sopenharmony_ci#define DELTA_MAX_FRAME_PRIV_SIZE 100 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci/* PM runtime auto power-off after 5ms of inactivity */ 578c2ecf20Sopenharmony_ci#define DELTA_HW_AUTOSUSPEND_DELAY_MS 5 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define DELTA_MAX_DECODERS 10 608c2ecf20Sopenharmony_ci#ifdef CONFIG_VIDEO_STI_DELTA_MJPEG 618c2ecf20Sopenharmony_ciextern const struct delta_dec mjpegdec; 628c2ecf20Sopenharmony_ci#endif 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#endif /* DELTA_CFG_H */ 65