blob: a56639962df11da8a48f3643cff438e507642520 [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"
Sushil Chauhan80e58432017-07-06 11:39:17 -070040#include <drm/msm_drm.h>
Saurabh Shah66c941b2016-07-06 17:34:05 -070041
42namespace sde_drm {
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -080043
44typedef std::map<std::pair<uint32_t, uint64_t>, float> CompRatioMap;
45
Saurabh Shah66c941b2016-07-06 17:34:05 -070046/*
47 * Drm Atomic Operation Codes
48 */
49enum struct DRMOps {
50 /*
51 * Op: Sets plane source crop
52 * Arg: uint32_t - Plane ID
53 * DRMRect - Source Rectangle
54 */
55 PLANE_SET_SRC_RECT,
56 /*
57 * Op: Sets plane destination rect
58 * Arg: uint32_t - Plane ID
59 * DRMRect - Dst Rectangle
60 */
61 PLANE_SET_DST_RECT,
62 /*
63 * Op: Sets plane zorder
64 * Arg: uint32_t - Plane ID
65 * uint32_t - zorder
66 */
67 PLANE_SET_ZORDER,
68 /*
69 * Op: Sets plane rotation flags
70 * Arg: uint32_t - Plane ID
71 * uint32_t - bit mask of rotation flags (See drm_mode.h for enums)
72 */
73 PLANE_SET_ROTATION,
74 /*
75 * Op: Sets plane alpha
76 * Arg: uint32_t - Plane ID
77 * uint32_t - alpha value
78 */
79 PLANE_SET_ALPHA,
80 /*
81 * Op: Sets the blend type
82 * Arg: uint32_t - Plane ID
83 * uint32_t - blend type (see DRMBlendType)
84 */
85 PLANE_SET_BLEND_TYPE,
86 /*
87 * Op: Sets horizontal decimation
88 * Arg: uint32_t - Plane ID
89 * uint32_t - decimation factor
90 */
91 PLANE_SET_H_DECIMATION,
92 /*
93 * Op: Sets vertical decimation
94 * Arg: uint32_t - Plane ID
95 * uint32_t - decimation factor
96 */
97 PLANE_SET_V_DECIMATION,
98 /*
Prabhanjan Kandula585aa652017-01-26 18:39:11 -080099 * Op: Sets source config flags
100 * Arg: uint32_t - Plane ID
101 * uint32_t - flags to enable or disable a specific op. E.g. deinterlacing
102 */
103 PLANE_SET_SRC_CONFIG,
104 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700105 * Op: Sets frame buffer ID for plane. Set together with CRTC.
106 * Arg: uint32_t - Plane ID
107 * uint32_t - Framebuffer ID
108 */
109 PLANE_SET_FB_ID,
110 /*
111 * Op: Sets the crtc for this plane. Set together with FB_ID.
112 * Arg: uint32_t - Plane ID
113 * uint32_t - CRTC ID
114 */
115 PLANE_SET_CRTC,
116 /*
117 * Op: Sets acquire fence for this plane's buffer. Set together with FB_ID, CRTC.
118 * Arg: uint32_t - Plane ID
119 * uint32_t - Input fence
120 */
121 PLANE_SET_INPUT_FENCE,
122 /*
Saurabh Shah0ffee302016-11-22 10:42:11 -0800123 * Op: Sets scaler config on this plane.
124 * Arg: uint32_t - Plane ID
125 * uint64_t - Address of the scaler config object (version based)
126 */
127 PLANE_SET_SCALER_CONFIG,
128 /*
Rohit Kulkarni8622e362017-01-30 18:14:10 -0800129 * Op: Sets plane rotation destination rect
130 * Arg: uint32_t - Plane ID
131 * DRMRect - rotator dst Rectangle
132 */
133 PLANE_SET_ROTATION_DST_RECT,
134 /*
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700135 * Op: Sets FB Secure mode for this plane.
136 * Arg: uint32_t - Plane ID
137 * uint32_t - Value of the FB Secure mode.
138 */
139 PLANE_SET_FB_SECURE_MODE,
140 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700141 * Op: Activate or deactivate a CRTC
142 * Arg: uint32_t - CRTC ID
143 * uint32_t - 1 to enable, 0 to disable
144 */
145 CRTC_SET_ACTIVE,
146 /*
147 * Op: Sets display mode
148 * Arg: uint32_t - CRTC ID
149 * drmModeModeInfo* - Pointer to display mode
150 */
151 CRTC_SET_MODE,
152 /*
153 * Op: Sets an offset indicating when a release fence should be signalled.
154 * Arg: uint32_t - offset
155 * 0: non-speculative, default
156 * 1: speculative
157 */
158 CRTC_SET_OUTPUT_FENCE_OFFSET,
159 /*
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800160 * Op: Sets overall SDE core clock
161 * Arg: uint32_t - CRTC ID
162 * uint32_t - core_clk
163 */
164 CRTC_SET_CORE_CLK,
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700165 /*
166 * Op: Sets MNOC bus average bandwidth
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800167 * Arg: uint32_t - CRTC ID
168 * uint32_t - core_ab
169 */
170 CRTC_SET_CORE_AB,
171 /*
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700172 * Op: Sets MNOC bus instantaneous bandwidth
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800173 * Arg: uint32_t - CRTC ID
174 * uint32_t - core_ib
175 */
176 CRTC_SET_CORE_IB,
177 /*
Ramkumar Radhakrishnan3c4de112017-05-24 22:38:30 -0700178 * Op: Sets LLCC Bus average bandwidth
179 * Arg: uint32_t - CRTC ID
180 * uint32_t - llcc_ab
181 */
182 CRTC_SET_LLCC_AB,
183 /*
184 * Op: Sets LLCC Bus instantaneous bandwidth
185 * Arg: uint32_t - CRTC ID
186 * uint32_t - llcc_ib
187 */
188 CRTC_SET_LLCC_IB,
189 /*
190 * Op: Sets DRAM bus average bandwidth
191 * Arg: uint32_t - CRTC ID
192 * uint32_t - dram_ab
193 */
194 CRTC_SET_DRAM_AB,
195 /*
196 * Op: Sets DRAM bus instantaneous bandwidth
197 * Arg: uint32_t - CRTC ID
198 * uint32_t - dram_ib
199 */
200 CRTC_SET_DRAM_IB,
201 /*
202 * Op: Sets rotator clock for inline rotation
203 * Arg: uint32_t - CRTC ID
204 * uint32_t - rot_clk
205 */
206 CRTC_SET_ROT_CLK, /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700207 * Op: Returns release fence for this frame. Should be called after Commit() on
208 * DRMAtomicReqInterface.
209 * Arg: uint32_t - CRTC ID
210 * int * - Pointer to an integer that will hold the returned fence
211 */
212 CRTC_GET_RELEASE_FENCE,
213 /*
Ping Li281f48d2017-01-16 12:45:40 -0800214 * Op: Sets PP feature
215 * Arg: uint32_t - CRTC ID
216 * DRMPPFeatureInfo * - PP feature data pointer
217 */
218 CRTC_SET_POST_PROC,
219 /*
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800220 * Op: Sets CRTC ROIs.
221 * Arg: uint32_t - CRTC ID
222 * uint32_t - number of ROIs
223 * DRMRect * - Array of CRTC ROIs
224 */
225 CRTC_SET_ROI,
226 /*
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700227 * Op: Sets Security level for CRTC.
228 * Arg: uint32_t - CRTC ID
229 * uint32_t - Security level
230 */
231 CRTC_SET_SECURITY_LEVEL,
232 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700233 * Op: Returns retire fence for this commit. Should be called after Commit() on
234 * DRMAtomicReqInterface.
235 * Arg: uint32_t - Connector ID
236 * int * - Pointer to an integer that will hold the returned fence
237 */
238 CONNECTOR_GET_RETIRE_FENCE,
239 /*
240 * Op: Sets writeback connector destination rect
241 * Arg: uint32_t - Connector ID
242 * DRMRect - Dst Rectangle
243 */
244 CONNECTOR_SET_OUTPUT_RECT,
245 /*
246 * Op: Sets frame buffer ID for writeback connector.
247 * Arg: uint32_t - Connector ID
248 * uint32_t - Framebuffer ID
249 */
250 CONNECTOR_SET_OUTPUT_FB_ID,
Sushil Chauhan3396e202017-04-14 18:34:22 -0700251 /*
252 * Op: Sets power mode for connector.
253 * Arg: uint32_t - Connector ID
254 * uint32_t - Power Mode
255 */
256 CONNECTOR_SET_POWER_MODE,
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800257 /*
258 * Op: Sets panel ROIs.
259 * Arg: uint32_t - Connector ID
260 * uint32_t - number of ROIs
261 * DRMRect * - Array of Connector ROIs
262 */
263 CONNECTOR_SET_ROI,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700264};
265
Saurabh Shahf9266ee2017-04-19 15:25:46 -0700266enum struct DRMRotation {
267 FLIP_H = 0x1,
268 FLIP_V = 0x2,
Prabhanjan Kandula5bc7f8b2017-05-23 12:24:57 -0700269 ROT_180 = FLIP_H | FLIP_V,
Saurabh Shahf9266ee2017-04-19 15:25:46 -0700270 ROT_90 = 0x4,
271};
272
Sushil Chauhan3396e202017-04-14 18:34:22 -0700273enum struct DRMPowerMode {
274 ON,
275 DOZE,
276 DOZE_SUSPEND,
277 OFF,
278};
279
Saurabh Shah66c941b2016-07-06 17:34:05 -0700280enum struct DRMBlendType {
281 UNDEFINED = 0,
282 OPAQUE = 1,
283 PREMULTIPLIED = 2,
284 COVERAGE = 3,
285};
286
Prabhanjan Kandula585aa652017-01-26 18:39:11 -0800287enum struct DRMSrcConfig {
288 DEINTERLACE = 0,
289};
290
Saurabh Shah66c941b2016-07-06 17:34:05 -0700291/* Display type to identify a suitable connector */
292enum struct DRMDisplayType {
293 PERIPHERAL,
294 TV,
295 VIRTUAL,
296};
297
298struct DRMRect {
299 uint32_t left; // Left-most pixel coordinate.
300 uint32_t top; // Top-most pixel coordinate.
301 uint32_t right; // Right-most pixel coordinate.
302 uint32_t bottom; // Bottom-most pixel coordinate.
303};
304
305//------------------------------------------------------------------------
306// DRM Info Query Types
307//------------------------------------------------------------------------
308
309enum struct QSEEDVersion {
310 V1,
311 V2,
312 V3,
313};
314
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700315enum struct SmartDMARevision {
316 V1,
317 V2,
318};
319
Saurabh Shah66c941b2016-07-06 17:34:05 -0700320/* Per CRTC Resource Info*/
321struct DRMCrtcInfo {
322 bool has_src_split;
323 uint32_t max_blend_stages;
324 QSEEDVersion qseed_version;
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700325 SmartDMARevision smart_dma_rev;
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800326 float ib_fudge_factor;
327 float clk_fudge_factor;
328 uint32_t dest_scale_prefill_lines;
329 uint32_t undersized_prefill_lines;
330 uint32_t macrotile_prefill_lines;
331 uint32_t nv12_prefill_lines;
332 uint32_t linear_prefill_lines;
333 uint32_t downscale_prefill_lines;
334 uint32_t extra_prefill_lines;
335 uint32_t amortized_threshold;
336 uint64_t max_bandwidth_low;
337 uint64_t max_bandwidth_high;
338 uint32_t max_sde_clk;
339 CompRatioMap comp_ratio_rt_map;
340 CompRatioMap comp_ratio_nrt_map;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700341};
342
343enum struct DRMPlaneType {
344 // Has CSC and scaling capability
345 VIG = 0,
346 // Has scaling capability but no CSC
347 RGB,
348 // No scaling support
349 DMA,
350 // Supports a small dimension and doesn't use a CRTC stage
351 CURSOR,
352 MAX,
353};
354
355struct DRMPlaneTypeInfo {
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700356 DRMPlaneType type;
357 uint32_t master_plane_id;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700358 // FourCC format enum and modifier
359 std::vector<std::pair<uint32_t, uint64_t>> formats_supported;
360 uint32_t max_linewidth;
361 uint32_t max_upscale;
362 uint32_t max_downscale;
363 uint32_t max_horizontal_deci;
364 uint32_t max_vertical_deci;
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800365 uint64_t max_pipe_bandwidth;
Rohit Kulkarni8622e362017-01-30 18:14:10 -0800366 uint32_t cache_size; // cache size in bytes for inline rotation support.
Saurabh Shah66c941b2016-07-06 17:34:05 -0700367};
368
Prabhanjan Kandulae6dfab92017-03-14 11:02:49 -0700369// All DRM Planes as map<Plane_id , plane_type_info> listed from highest to lowest priority
370typedef std::vector<std::pair<uint32_t, DRMPlaneTypeInfo>> DRMPlanesInfo;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700371
372enum struct DRMTopology {
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700373 UNKNOWN, // To be compat with driver defs in sde_rm.h
Saurabh Shah66c941b2016-07-06 17:34:05 -0700374 SINGLE_LM,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700375 SINGLE_LM_DSC,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700376 DUAL_LM,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700377 DUAL_LM_DSC,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700378 DUAL_LM_MERGE,
Rohit Kulkarni2faa91c2017-06-05 15:43:48 -0700379 DUAL_LM_MERGE_DSC,
380 DUAL_LM_DSCMERGE,
381 PPSPLIT,
Saurabh Shah66c941b2016-07-06 17:34:05 -0700382};
383
384enum struct DRMPanelMode {
385 VIDEO,
386 COMMAND,
387};
388
389/* Per Connector Info*/
390struct DRMConnectorInfo {
391 uint32_t mmWidth;
392 uint32_t mmHeight;
393 uint32_t type;
394 uint32_t num_modes;
395 drmModeModeInfo *modes;
396 DRMTopology topology;
397 std::string panel_name;
398 DRMPanelMode panel_mode;
399 bool is_primary;
400 // Valid only if DRMPanelMode is VIDEO
401 bool dynamic_fps;
402 // FourCC format enum and modifier
403 std::vector<std::pair<uint32_t, uint64_t>> formats_supported;
404 // Valid only if type is DRM_MODE_CONNECTOR_VIRTUAL
405 uint32_t max_linewidth;
Saurabh Shahe9f55d72017-03-03 15:14:13 -0800406 // Valid only if mode is command
407 int num_roi;
408 int xstart;
409 int ystart;
410 int walign;
411 int halign;
412 int wmin;
413 int hmin;
414 bool roi_merge;
Prabhanjan Kandula5bc7f8b2017-05-23 12:24:57 -0700415 DRMRotation panel_orientation;
Sushil Chauhan80e58432017-07-06 11:39:17 -0700416 drm_panel_hdr_properties panel_hdr_prop;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700417};
418
419/* Identifier token for a display */
420struct DRMDisplayToken {
421 uint32_t conn_id;
422 uint32_t crtc_id;
423};
424
Ping Li281f48d2017-01-16 12:45:40 -0800425enum DRMPPFeatureID {
426 kFeaturePcc,
427 kFeatureIgc,
428 kFeaturePgc,
429 kFeatureMixerGc,
430 kFeaturePaV2,
431 kFeatureDither,
432 kFeatureGamut,
433 kFeaturePADither,
434 kPPFeaturesMax,
435};
436
437enum DRMPPPropType {
438 kPropEnum,
439 kPropRange,
440 kPropBlob,
441 kPropTypeMax,
442};
443
444struct DRMPPFeatureInfo {
445 DRMPPFeatureID id;
446 DRMPPPropType type;
447 uint32_t version;
448 uint32_t payload_size;
449 void *payload;
450};
451
Saurabh Shah0ffee302016-11-22 10:42:11 -0800452struct DRMScalerLUTInfo {
453 uint32_t dir_lut_size = 0;
454 uint32_t cir_lut_size = 0;
455 uint32_t sep_lut_size = 0;
456 uint64_t dir_lut = 0;
457 uint64_t cir_lut = 0;
458 uint64_t sep_lut = 0;
459};
460
Sushil Chauhan1021cc02017-05-03 15:11:43 -0700461enum struct DRMSecureMode {
462 NON_SECURE,
463 SECURE,
464 NON_SECURE_DIR_TRANSLATION,
465 SECURE_DIR_TRANSLATION,
466};
467
468enum struct DRMSecurityLevel {
469 SECURE_NON_SECURE,
470 SECURE_ONLY,
471};
472
Saurabh Shah66c941b2016-07-06 17:34:05 -0700473/* DRM Atomic Request Property Set.
474 *
475 * Helper class to create and populate atomic properties of DRM components
476 * when rendered in DRM atomic mode */
477class DRMAtomicReqInterface {
478 public:
479 virtual ~DRMAtomicReqInterface() {}
480 /* Perform request operation.
481 *
482 * [input]: opcode: operation code from DRMOps list.
483 * var_arg: arguments for DRMOps's can differ in number and
484 * data type. Refer above DRMOps to details.
485 * [return]: Error code if the API fails, 0 on success.
486 */
487 virtual int Perform(DRMOps opcode, ...) = 0;
488
489 /*
490 * Commit the params set via Perform(). Also resets the properties after commit. Needs to be
491 * called every frame.
492 * [input]: synchronous: Determines if the call should block until a h/w flip
493 * [return]: Error code if the API fails, 0 on success.
494 */
495 virtual int Commit(bool synchronous) = 0;
496 /*
497 * Validate the params set via Perform().
498 * [return]: Error code if the API fails, 0 on success.
499 */
500 virtual int Validate() = 0;
501};
502
503class DRMManagerInterface;
504
505/* Populates a singleton instance of DRMManager */
506typedef int (*GetDRMManager)(int fd, DRMManagerInterface **intf);
507
508/* Destroy DRMManager instance */
Saurabh Shahab7807c2017-02-08 15:41:08 -0800509typedef int (*DestroyDRMManager)();
Saurabh Shah66c941b2016-07-06 17:34:05 -0700510
511/*
512 * DRM Manager Interface - Any class which plans to implement helper function for vendor
513 * specific DRM driver implementation must implement the below interface routines to work
514 * with SDM.
515 */
516
517class DRMManagerInterface {
518 public:
519 virtual ~DRMManagerInterface() {}
520
521 /*
522 * Since SDM completely manages the planes. GetPlanesInfo will provide all
523 * the plane information.
524 * [output]: DRMPlanesInfo: Resource Info for planes.
525 */
526 virtual void GetPlanesInfo(DRMPlanesInfo *info) = 0;
527
528 /*
529 * Will provide all the information of a selected crtc.
530 * [input]: Use crtc id 0 to obtain system wide info
531 * [output]: DRMCrtcInfo: Resource Info for the given CRTC id.
532 */
533 virtual void GetCrtcInfo(uint32_t crtc_id, DRMCrtcInfo *info) = 0;
534
535 /*
536 * Will provide all the information of a selected connector.
537 * [output]: DRMConnectorInfo: Resource Info for the given connector id
538 */
539 virtual void GetConnectorInfo(uint32_t conn_id, DRMConnectorInfo *info) = 0;
540
541 /*
Ping Li281f48d2017-01-16 12:45:40 -0800542 * Will query post propcessing feature info of a CRTC.
543 * [output]: DRMPPFeatureInfo: CRTC post processing feature info
544 */
Ramkumar Radhakrishnan9ed1fd82017-03-09 18:46:41 -0800545 virtual void GetCrtcPPInfo(uint32_t crtc_id, DRMPPFeatureInfo &info) = 0;
Ping Li281f48d2017-01-16 12:45:40 -0800546 /*
Saurabh Shah66c941b2016-07-06 17:34:05 -0700547 * Register a logical display to receive a token.
548 * Each display pipeline in DRM is identified by its CRTC and Connector(s).
549 * On display connect(bootup or hotplug), clients should invoke this interface to
550 * establish the pipeline for the display and should get a DisplayToken
551 * populated with crtc and connnector(s) id's. Here onwards, Client should
552 * use this token to represent the display for any Perform operations if
553 * needed.
554 *
555 * [input]: disp_type - Peripheral / TV / Virtual
556 * [output]: DRMDisplayToken - CRTC and Connector id's for the display
557 * [return]: 0 on success, a negative error value otherwise
558 */
559 virtual int RegisterDisplay(DRMDisplayType disp_type, DRMDisplayToken *tok) = 0;
560
561 /* Client should invoke this interface on display disconnect.
562 * [input]: DRMDisplayToken - identifier for the display.
563 */
564 virtual void UnregisterDisplay(const DRMDisplayToken &token) = 0;
565
566 /*
567 * Creates and returns an instance of DRMAtomicReqInterface corresponding to a display token
568 * returned as part of RegisterDisplay API. Needs to be called per display.
569 * [input]: DRMDisplayToken that identifies a display pipeline
570 * [output]: Pointer to an instance of DRMAtomicReqInterface.
571 * [return]: Error code if the API fails, 0 on success.
572 */
573 virtual int CreateAtomicReq(const DRMDisplayToken &token, DRMAtomicReqInterface **intf) = 0;
574
575 /*
576 * Destroys the instance of DRMAtomicReqInterface
577 * [input]: Pointer to a DRMAtomicReqInterface
578 * [return]: Error code if the API fails, 0 on success.
579 */
580 virtual int DestroyAtomicReq(DRMAtomicReqInterface *intf) = 0;
Saurabh Shah0ffee302016-11-22 10:42:11 -0800581 /*
582 * Sets the global scaler LUT
583 * [input]: LUT Info
584 * [return]: Error code if the API fails, 0 on success.
585 */
586 virtual int SetScalerLUT(const DRMScalerLUTInfo &lut_info) = 0;
Saurabh Shah66c941b2016-07-06 17:34:05 -0700587};
Saurabh Shah0ffee302016-11-22 10:42:11 -0800588
Saurabh Shah66c941b2016-07-06 17:34:05 -0700589} // namespace sde_drm
590#endif // __DRM_INTERFACE_H__