blob: 51cb67261a67e77436a8c11922e2ac27bf6953e7 [file] [log] [blame]
Saurabh Shah66c941b2016-07-06 17:34:05 -07001/*
2* Copyright (c) 2017, The Linux Foundation. All rights reserved.
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are
6* met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above
10* copyright notice, this list of conditions and the following
11* disclaimer in the documentation and/or other materials provided
12* with the distribution.
13* * Neither the name of The Linux Foundation nor the names of its
14* contributors may be used to endorse or promote products derived
15* from this software without specific prior written permission.
16*
17* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30#ifndef __DRM_INTERFACE_H__
31#define __DRM_INTERFACE_H__
32
33#include <map>
34#include <string>
35#include <utility>
36#include <vector>
37
38#include "xf86drm.h"
39#include "xf86drmMode.h"
40
41namespace sde_drm {
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -080042
43typedef std::map<std::pair<uint32_t, uint64_t>, float> CompRatioMap;
44
Saurabh Shah66c941b2016-07-06 17:34:05 -070045/*
46 * Drm Atomic Operation Codes
47 */
48enum struct DRMOps {
49 /*
50 * Op: Sets plane source crop
51 * Arg: uint32_t - Plane ID
52 * DRMRect - Source Rectangle
53 */
54 PLANE_SET_SRC_RECT,
55 /*
56 * Op: Sets plane destination rect
57 * Arg: uint32_t - Plane ID
58 * DRMRect - Dst Rectangle
59 */
60 PLANE_SET_DST_RECT,
61 /*
62 * Op: Sets plane zorder
63 * Arg: uint32_t - Plane ID
64 * uint32_t - zorder
65 */
66 PLANE_SET_ZORDER,
67 /*
68 * Op: Sets plane rotation flags
69 * Arg: uint32_t - Plane ID
70 * uint32_t - bit mask of rotation flags (See drm_mode.h for enums)
71 */
72 PLANE_SET_ROTATION,
73 /*
74 * Op: Sets plane alpha
75 * Arg: uint32_t - Plane ID
76 * uint32_t - alpha value
77 */
78 PLANE_SET_ALPHA,
79 /*
80 * Op: Sets the blend type
81 * Arg: uint32_t - Plane ID
82 * uint32_t - blend type (see DRMBlendType)
83 */
84 PLANE_SET_BLEND_TYPE,
85 /*
86 * Op: Sets horizontal decimation
87 * Arg: uint32_t - Plane ID
88 * uint32_t - decimation factor
89 */
90 PLANE_SET_H_DECIMATION,
91 /*
92 * Op: Sets vertical decimation
93 * Arg: uint32_t - Plane ID
94 * uint32_t - decimation factor
95 */
96 PLANE_SET_V_DECIMATION,
97 /*
Prabhanjan Kandula585aa652017-01-26 18:39:11 -080098 * Op: Sets source config flags
99 * Arg: uint32_t - Plane ID
100 * uint32_t - flags to enable or disable a specific op. E.g. deinterlacing
101 */
102 PLANE_SET_SRC_CONFIG,
103 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700104 * Op: Sets frame buffer ID for plane. Set together with CRTC.
105 * Arg: uint32_t - Plane ID
106 * uint32_t - Framebuffer ID
107 */
108 PLANE_SET_FB_ID,
109 /*
110 * Op: Sets the crtc for this plane. Set together with FB_ID.
111 * Arg: uint32_t - Plane ID
112 * uint32_t - CRTC ID
113 */
114 PLANE_SET_CRTC,
115 /*
116 * Op: Sets acquire fence for this plane's buffer. Set together with FB_ID, CRTC.
117 * Arg: uint32_t - Plane ID
118 * uint32_t - Input fence
119 */
120 PLANE_SET_INPUT_FENCE,
121 /*
Saurabh Shah0ffee302016-11-22 10:42:11 -0800122 * Op: Sets scaler config on this plane.
123 * Arg: uint32_t - Plane ID
124 * uint64_t - Address of the scaler config object (version based)
125 */
126 PLANE_SET_SCALER_CONFIG,
127 /*
Rohit Kulkarni8622e362017-01-30 18:14:10 -0800128 * Op: Sets plane rotation destination rect
129 * Arg: uint32_t - Plane ID
130 * DRMRect - rotator dst Rectangle
131 */
132 PLANE_SET_ROTATION_DST_RECT,
133 /*
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700134 * Op: Sets FB Secure mode for this plane.
135 * Arg: uint32_t - Plane ID
136 * uint32_t - Value of the FB Secure mode.
137 */
138 PLANE_SET_FB_SECURE_MODE,
139 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700140 * Op: Activate or deactivate a CRTC
141 * Arg: uint32_t - CRTC ID
142 * uint32_t - 1 to enable, 0 to disable
143 */
144 CRTC_SET_ACTIVE,
145 /*
146 * Op: Sets display mode
147 * Arg: uint32_t - CRTC ID
148 * drmModeModeInfo* - Pointer to display mode
149 */
150 CRTC_SET_MODE,
151 /*
152 * Op: Sets an offset indicating when a release fence should be signalled.
153 * Arg: uint32_t - offset
154 * 0: non-speculative, default
155 * 1: speculative
156 */
157 CRTC_SET_OUTPUT_FENCE_OFFSET,
158 /*
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800159 * Op: Sets overall SDE core clock
160 * Arg: uint32_t - CRTC ID
161 * uint32_t - core_clk
162 */
163 CRTC_SET_CORE_CLK,
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700164 /*
165 * Op: Sets MNOC bus average bandwidth
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800166 * Arg: uint32_t - CRTC ID
167 * uint32_t - core_ab
168 */
169 CRTC_SET_CORE_AB,
170 /*
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700171 * Op: Sets MNOC bus instantaneous bandwidth
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800172 * Arg: uint32_t - CRTC ID
173 * uint32_t - core_ib
174 */
175 CRTC_SET_CORE_IB,
176 /*
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700177 * Op: Sets LLCC Bus average bandwidth
178 * Arg: uint32_t - CRTC ID
179 * uint32_t - llcc_ab
180 */
181 CRTC_SET_LLCC_AB,
182 /*
183 * Op: Sets LLCC Bus instantaneous bandwidth
184 * Arg: uint32_t - CRTC ID
185 * uint32_t - llcc_ib
186 */
187 CRTC_SET_LLCC_IB,
188 /*
189 * Op: Sets DRAM bus average bandwidth
190 * Arg: uint32_t - CRTC ID
191 * uint32_t - dram_ab
192 */
193 CRTC_SET_DRAM_AB,
194 /*
195 * Op: Sets DRAM bus instantaneous bandwidth
196 * Arg: uint32_t - CRTC ID
197 * uint32_t - dram_ib
198 */
199 CRTC_SET_DRAM_IB,
200 /*
201 * Op: Sets rotator clock for inline rotation
202 * Arg: uint32_t - CRTC ID
203 * uint32_t - rot_clk
204 */
205 CRTC_SET_ROT_CLK, /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700206 * Op: Returns release fence for this frame. Should be called after Commit() on
207 * DRMAtomicReqInterface.
208 * Arg: uint32_t - CRTC ID
209 * int * - Pointer to an integer that will hold the returned fence
210 */
211 CRTC_GET_RELEASE_FENCE,
212 /*
Ping Li281f48d2017-01-16 12:45:40 -0800213 * Op: Sets PP feature
214 * Arg: uint32_t - CRTC ID
215 * DRMPPFeatureInfo * - PP feature data pointer
216 */
217 CRTC_SET_POST_PROC,
218 /*
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800219 * Op: Sets CRTC ROIs.
220 * Arg: uint32_t - CRTC ID
221 * uint32_t - number of ROIs
222 * DRMRect * - Array of CRTC ROIs
223 */
224 CRTC_SET_ROI,
225 /*
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700226 * Op: Sets Security level for CRTC.
227 * Arg: uint32_t - CRTC ID
228 * uint32_t - Security level
229 */
230 CRTC_SET_SECURITY_LEVEL,
231 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700232 * Op: Returns retire fence for this commit. Should be called after Commit() on
233 * DRMAtomicReqInterface.
234 * Arg: uint32_t - Connector ID
235 * int * - Pointer to an integer that will hold the returned fence
236 */
237 CONNECTOR_GET_RETIRE_FENCE,
238 /*
239 * Op: Sets writeback connector destination rect
240 * Arg: uint32_t - Connector ID
241 * DRMRect - Dst Rectangle
242 */
243 CONNECTOR_SET_OUTPUT_RECT,
244 /*
245 * Op: Sets frame buffer ID for writeback connector.
246 * Arg: uint32_t - Connector ID
247 * uint32_t - Framebuffer ID
248 */
249 CONNECTOR_SET_OUTPUT_FB_ID,
Sushil Chauhan3396e202017-04-14 18:34:22 -0700250 /*
251 * Op: Sets power mode for connector.
252 * Arg: uint32_t - Connector ID
253 * uint32_t - Power Mode
254 */
255 CONNECTOR_SET_POWER_MODE,
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800256 /*
257 * Op: Sets panel ROIs.
258 * Arg: uint32_t - Connector ID
259 * uint32_t - number of ROIs
260 * DRMRect * - Array of Connector ROIs
261 */
262 CONNECTOR_SET_ROI,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700263};
264
Saurabh Shahf9266ee2017-04-19 15:25:46 -0700265enum struct DRMRotation {
266 FLIP_H = 0x1,
267 FLIP_V = 0x2,
Prabhanjan Kandula5bc7f8b2017-05-23 12:24:57 -0700268 ROT_180 = FLIP_H | FLIP_V,
Saurabh Shahf9266ee2017-04-19 15:25:46 -0700269 ROT_90 = 0x4,
270};
271
Sushil Chauhan3396e202017-04-14 18:34:22 -0700272enum struct DRMPowerMode {
273 ON,
274 DOZE,
275 DOZE_SUSPEND,
276 OFF,
277};
278
Saurabh Shah66c941b2016-07-06 17:34:05 -0700279enum struct DRMBlendType {
280 UNDEFINED = 0,
281 OPAQUE = 1,
282 PREMULTIPLIED = 2,
283 COVERAGE = 3,
284};
285
Prabhanjan Kandula585aa652017-01-26 18:39:11 -0800286enum struct DRMSrcConfig {
287 DEINTERLACE = 0,
288};
289
Saurabh Shah66c941b2016-07-06 17:34:05 -0700290/* Display type to identify a suitable connector */
291enum struct DRMDisplayType {
292 PERIPHERAL,
293 TV,
294 VIRTUAL,
295};
296
297struct DRMRect {
298 uint32_t left; // Left-most pixel coordinate.
299 uint32_t top; // Top-most pixel coordinate.
300 uint32_t right; // Right-most pixel coordinate.
301 uint32_t bottom; // Bottom-most pixel coordinate.
302};
303
304//------------------------------------------------------------------------
305// DRM Info Query Types
306//------------------------------------------------------------------------
307
308enum struct QSEEDVersion {
309 V1,
310 V2,
311 V3,
312};
313
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700314enum struct SmartDMARevision {
315 V1,
316 V2,
317};
318
Saurabh Shah66c941b2016-07-06 17:34:05 -0700319/* Per CRTC Resource Info*/
320struct DRMCrtcInfo {
321 bool has_src_split;
322 uint32_t max_blend_stages;
323 QSEEDVersion qseed_version;
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700324 SmartDMARevision smart_dma_rev;
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800325 float ib_fudge_factor;
326 float clk_fudge_factor;
327 uint32_t dest_scale_prefill_lines;
328 uint32_t undersized_prefill_lines;
329 uint32_t macrotile_prefill_lines;
330 uint32_t nv12_prefill_lines;
331 uint32_t linear_prefill_lines;
332 uint32_t downscale_prefill_lines;
333 uint32_t extra_prefill_lines;
334 uint32_t amortized_threshold;
335 uint64_t max_bandwidth_low;
336 uint64_t max_bandwidth_high;
337 uint32_t max_sde_clk;
338 CompRatioMap comp_ratio_rt_map;
339 CompRatioMap comp_ratio_nrt_map;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700340};
341
342enum struct DRMPlaneType {
343 // Has CSC and scaling capability
344 VIG = 0,
345 // Has scaling capability but no CSC
346 RGB,
347 // No scaling support
348 DMA,
349 // Supports a small dimension and doesn't use a CRTC stage
350 CURSOR,
351 MAX,
352};
353
354struct DRMPlaneTypeInfo {
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700355 DRMPlaneType type;
356 uint32_t master_plane_id;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700357 // FourCC format enum and modifier
358 std::vector<std::pair<uint32_t, uint64_t>> formats_supported;
359 uint32_t max_linewidth;
360 uint32_t max_upscale;
361 uint32_t max_downscale;
362 uint32_t max_horizontal_deci;
363 uint32_t max_vertical_deci;
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800364 uint64_t max_pipe_bandwidth;
Rohit Kulkarni8622e362017-01-30 18:14:10 -0800365 uint32_t cache_size; // cache size in bytes for inline rotation support.
Saurabh Shah66c941b2016-07-06 17:34:05 -0700366};
367
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700368// All DRM Planes as map<Plane_id , plane_type_info> listed from highest to lowest priority
369typedef std::vector<std::pair<uint32_t, DRMPlaneTypeInfo>> DRMPlanesInfo;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700370
371enum struct DRMTopology {
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700372 UNKNOWN, // To be compat with driver defs in sde_rm.h
Saurabh Shah66c941b2016-07-06 17:34:05 -0700373 SINGLE_LM,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700374 SINGLE_LM_DSC,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700375 DUAL_LM,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700376 DUAL_LM_DSC,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700377 DUAL_LM_MERGE,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700378 DUAL_LM_MERGE_DSC,
379 DUAL_LM_DSCMERGE,
380 PPSPLIT,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700381};
382
383enum struct DRMPanelMode {
384 VIDEO,
385 COMMAND,
386};
387
388/* Per Connector Info*/
389struct DRMConnectorInfo {
390 uint32_t mmWidth;
391 uint32_t mmHeight;
392 uint32_t type;
393 uint32_t num_modes;
394 drmModeModeInfo *modes;
395 DRMTopology topology;
396 std::string panel_name;
397 DRMPanelMode panel_mode;
398 bool is_primary;
399 // Valid only if DRMPanelMode is VIDEO
400 bool dynamic_fps;
401 // FourCC format enum and modifier
402 std::vector<std::pair<uint32_t, uint64_t>> formats_supported;
403 // Valid only if type is DRM_MODE_CONNECTOR_VIRTUAL
404 uint32_t max_linewidth;
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800405 // Valid only if mode is command
406 int num_roi;
407 int xstart;
408 int ystart;
409 int walign;
410 int halign;
411 int wmin;
412 int hmin;
413 bool roi_merge;
Prabhanjan Kandula5bc7f8b2017-05-23 12:24:57 -0700414 DRMRotation panel_orientation;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700415};
416
417/* Identifier token for a display */
418struct DRMDisplayToken {
419 uint32_t conn_id;
420 uint32_t crtc_id;
421};
422
Ping Li281f48d2017-01-16 12:45:40 -0800423enum DRMPPFeatureID {
424 kFeaturePcc,
425 kFeatureIgc,
426 kFeaturePgc,
427 kFeatureMixerGc,
428 kFeaturePaV2,
429 kFeatureDither,
430 kFeatureGamut,
431 kFeaturePADither,
432 kPPFeaturesMax,
433};
434
435enum DRMPPPropType {
436 kPropEnum,
437 kPropRange,
438 kPropBlob,
439 kPropTypeMax,
440};
441
442struct DRMPPFeatureInfo {
443 DRMPPFeatureID id;
444 DRMPPPropType type;
445 uint32_t version;
446 uint32_t payload_size;
447 void *payload;
448};
449
Saurabh Shah0ffee302016-11-22 10:42:11 -0800450struct DRMScalerLUTInfo {
451 uint32_t dir_lut_size = 0;
452 uint32_t cir_lut_size = 0;
453 uint32_t sep_lut_size = 0;
454 uint64_t dir_lut = 0;
455 uint64_t cir_lut = 0;
456 uint64_t sep_lut = 0;
457};
458
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700459enum struct DRMSecureMode {
460 NON_SECURE,
461 SECURE,
462 NON_SECURE_DIR_TRANSLATION,
463 SECURE_DIR_TRANSLATION,
464};
465
466enum struct DRMSecurityLevel {
467 SECURE_NON_SECURE,
468 SECURE_ONLY,
469};
470
Saurabh Shah66c941b2016-07-06 17:34:05 -0700471/* DRM Atomic Request Property Set.
472 *
473 * Helper class to create and populate atomic properties of DRM components
474 * when rendered in DRM atomic mode */
475class DRMAtomicReqInterface {
476 public:
477 virtual ~DRMAtomicReqInterface() {}
478 /* Perform request operation.
479 *
480 * [input]: opcode: operation code from DRMOps list.
481 * var_arg: arguments for DRMOps's can differ in number and
482 * data type. Refer above DRMOps to details.
483 * [return]: Error code if the API fails, 0 on success.
484 */
485 virtual int Perform(DRMOps opcode, ...) = 0;
486
487 /*
488 * Commit the params set via Perform(). Also resets the properties after commit. Needs to be
489 * called every frame.
490 * [input]: synchronous: Determines if the call should block until a h/w flip
491 * [return]: Error code if the API fails, 0 on success.
492 */
493 virtual int Commit(bool synchronous) = 0;
494 /*
495 * Validate the params set via Perform().
496 * [return]: Error code if the API fails, 0 on success.
497 */
498 virtual int Validate() = 0;
499};
500
501class DRMManagerInterface;
502
503/* Populates a singleton instance of DRMManager */
504typedef int (*GetDRMManager)(int fd, DRMManagerInterface **intf);
505
506/* Destroy DRMManager instance */
Saurabh Shahab7807c2017-02-08 15:41:08 -0800507typedef int (*DestroyDRMManager)();
Saurabh Shah66c941b2016-07-06 17:34:05 -0700508
509/*
510 * DRM Manager Interface - Any class which plans to implement helper function for vendor
511 * specific DRM driver implementation must implement the below interface routines to work
512 * with SDM.
513 */
514
515class DRMManagerInterface {
516 public:
517 virtual ~DRMManagerInterface() {}
518
519 /*
520 * Since SDM completely manages the planes. GetPlanesInfo will provide all
521 * the plane information.
522 * [output]: DRMPlanesInfo: Resource Info for planes.
523 */
524 virtual void GetPlanesInfo(DRMPlanesInfo *info) = 0;
525
526 /*
527 * Will provide all the information of a selected crtc.
528 * [input]: Use crtc id 0 to obtain system wide info
529 * [output]: DRMCrtcInfo: Resource Info for the given CRTC id.
530 */
531 virtual void GetCrtcInfo(uint32_t crtc_id, DRMCrtcInfo *info) = 0;
532
533 /*
534 * Will provide all the information of a selected connector.
535 * [output]: DRMConnectorInfo: Resource Info for the given connector id
536 */
537 virtual void GetConnectorInfo(uint32_t conn_id, DRMConnectorInfo *info) = 0;
538
539 /*
Ping Li281f48d2017-01-16 12:45:40 -0800540 * Will query post propcessing feature info of a CRTC.
541 * [output]: DRMPPFeatureInfo: CRTC post processing feature info
542 */
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800543 virtual void GetCrtcPPInfo(uint32_t crtc_id, DRMPPFeatureInfo &info) = 0;
Ping Li281f48d2017-01-16 12:45:40 -0800544 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700545 * Register a logical display to receive a token.
546 * Each display pipeline in DRM is identified by its CRTC and Connector(s).
547 * On display connect(bootup or hotplug), clients should invoke this interface to
548 * establish the pipeline for the display and should get a DisplayToken
549 * populated with crtc and connnector(s) id's. Here onwards, Client should
550 * use this token to represent the display for any Perform operations if
551 * needed.
552 *
553 * [input]: disp_type - Peripheral / TV / Virtual
554 * [output]: DRMDisplayToken - CRTC and Connector id's for the display
555 * [return]: 0 on success, a negative error value otherwise
556 */
557 virtual int RegisterDisplay(DRMDisplayType disp_type, DRMDisplayToken *tok) = 0;
558
559 /* Client should invoke this interface on display disconnect.
560 * [input]: DRMDisplayToken - identifier for the display.
561 */
562 virtual void UnregisterDisplay(const DRMDisplayToken &token) = 0;
563
564 /*
565 * Creates and returns an instance of DRMAtomicReqInterface corresponding to a display token
566 * returned as part of RegisterDisplay API. Needs to be called per display.
567 * [input]: DRMDisplayToken that identifies a display pipeline
568 * [output]: Pointer to an instance of DRMAtomicReqInterface.
569 * [return]: Error code if the API fails, 0 on success.
570 */
571 virtual int CreateAtomicReq(const DRMDisplayToken &token, DRMAtomicReqInterface **intf) = 0;
572
573 /*
574 * Destroys the instance of DRMAtomicReqInterface
575 * [input]: Pointer to a DRMAtomicReqInterface
576 * [return]: Error code if the API fails, 0 on success.
577 */
578 virtual int DestroyAtomicReq(DRMAtomicReqInterface *intf) = 0;
Saurabh Shah0ffee302016-11-22 10:42:11 -0800579 /*
580 * Sets the global scaler LUT
581 * [input]: LUT Info
582 * [return]: Error code if the API fails, 0 on success.
583 */
584 virtual int SetScalerLUT(const DRMScalerLUTInfo &lut_info) = 0;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700585};
Saurabh Shah0ffee302016-11-22 10:42:11 -0800586
Saurabh Shah66c941b2016-07-06 17:34:05 -0700587} // namespace sde_drm
588#endif // __DRM_INTERFACE_H__