blob: 5477e81c92f12eac8746d758bcde6ae1c09d853b [file] [log] [blame]
Lloyd Atkinson09fed912016-06-24 18:14:13 -04001/*
Dhaval Patel81e87882016-10-19 21:41:56 -07002 * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
Lloyd Atkinson09fed912016-06-24 18:14:13 -04003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#ifndef __SDE_ENCODER_PHYS_H__
16#define __SDE_ENCODER_PHYS_H__
17
18#include "sde_kms.h"
19#include "sde_hw_intf.h"
Lloyd Atkinsona59eead2016-05-30 14:37:06 -040020#include "sde_hw_pingpong.h"
Clarence Ipc475b082016-06-26 09:27:23 -040021#include "sde_hw_ctl.h"
Lloyd Atkinson5d722782016-05-30 14:09:41 -040022#include "sde_hw_top.h"
Alan Kwongbb27c092016-07-20 16:41:25 -040023#include "sde_hw_wb.h"
24#include "sde_hw_cdm.h"
Alan Kwong83285fb2016-10-21 20:51:17 -040025#include "sde_encoder.h"
26#include "sde_connector.h"
Alan Kwongbb27c092016-07-20 16:41:25 -040027
28#define SDE_ENCODER_NAME_MAX 16
Lloyd Atkinson09fed912016-06-24 18:14:13 -040029
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040030/**
31 * enum sde_enc_split_role - Role this physical encoder will play in a
32 * split-panel configuration, where one panel is master, and others slaves.
33 * Masters have extra responsibilities, like managing the VBLANK IRQ.
34 * @ENC_ROLE_SOLO: This is the one and only panel. This encoder is master.
35 * @ENC_ROLE_MASTER: This encoder is the master of a split panel config.
36 * @ENC_ROLE_SLAVE: This encoder is not the master of a split panel config.
37 */
38enum sde_enc_split_role {
39 ENC_ROLE_SOLO,
40 ENC_ROLE_MASTER,
41 ENC_ROLE_SLAVE
42};
Lloyd Atkinson09fed912016-06-24 18:14:13 -040043
44struct sde_encoder_phys;
45
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040046/**
47 * struct sde_encoder_virt_ops - Interface the containing virtual encoder
48 * provides for the physical encoders to use to callback.
49 * @handle_vblank_virt: Notify virtual encoder of vblank IRQ reception
50 * Note: This is called from IRQ handler context.
Dhaval Patel81e87882016-10-19 21:41:56 -070051 * @handle_underrun_virt: Notify virtual encoder of underrun IRQ reception
52 * Note: This is called from IRQ handler context.
Lloyd Atkinson5d722782016-05-30 14:09:41 -040053 * @handle_ready_for_kickoff: Notify virtual encoder that this phys encoder
54 * is now ready for the next kickoff.
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040055 */
Lloyd Atkinson09fed912016-06-24 18:14:13 -040056struct sde_encoder_virt_ops {
Dhaval Patel81e87882016-10-19 21:41:56 -070057 void (*handle_vblank_virt)(struct drm_encoder *,
58 struct sde_encoder_phys *phys);
59 void (*handle_underrun_virt)(struct drm_encoder *,
60 struct sde_encoder_phys *phys);
Lloyd Atkinson5d722782016-05-30 14:09:41 -040061 void (*handle_ready_for_kickoff)(struct drm_encoder *,
62 struct sde_encoder_phys *phys);
Lloyd Atkinson09fed912016-06-24 18:14:13 -040063};
64
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040065/**
66 * struct sde_encoder_phys_ops - Interface the physical encoders provide to
67 * the containing virtual encoder.
68 * @is_master: Whether this phys_enc is the current master
69 * encoder. Can be switched at enable time. Based
70 * on split_role and current mode (CMD/VID).
71 * @mode_fixup: DRM Call. Fixup a DRM mode.
72 * @mode_set: DRM Call. Set a DRM mode.
73 * This likely caches the mode, for use at enable.
74 * @enable: DRM Call. Enable a DRM mode.
75 * @disable: DRM Call. Disable mode.
Alan Kwongbb27c092016-07-20 16:41:25 -040076 * @atomic_check: DRM Call. Atomic check new DRM state.
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040077 * @destroy: DRM Call. Destroy and release resources.
78 * @get_hw_resources: Populate the structure with the hardware
79 * resources that this phys_enc is using.
80 * Expect no overlap between phys_encs.
Lloyd Atkinson5d722782016-05-30 14:09:41 -040081 * @control_vblank_irq Register/Deregister for VBLANK IRQ
82 * @wait_for_commit_done: Wait for hardware to have flushed the
83 * current pending frames to hardware
84 * @prepare_for_kickoff: Do any work necessary prior to a kickoff
85 * and report whether need to wait before
86 * triggering the next kickoff
87 * (ie for previous tx to complete)
88 * @handle_post_kickoff: Do any work necessary post-kickoff work
Clarence Ip110d15c2016-08-16 14:44:41 -040089 * @trigger_start: Process start event on physical encoder
90 * @needs_split_flush: Whether encoder type needs split flush
Jayant Shekhar1d50ed22016-11-04 18:41:12 +053091 * @setup_misr: Sets up MISR, enable and disables based on sysfs
92 * @collect_misr: Collects MISR data on frame update
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040093 */
Lloyd Atkinson5d722782016-05-30 14:09:41 -040094
Lloyd Atkinson09fed912016-06-24 18:14:13 -040095struct sde_encoder_phys_ops {
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -040096 bool (*is_master)(struct sde_encoder_phys *encoder);
Lloyd Atkinson09fed912016-06-24 18:14:13 -040097 bool (*mode_fixup)(struct sde_encoder_phys *encoder,
98 const struct drm_display_mode *mode,
99 struct drm_display_mode *adjusted_mode);
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400100 void (*mode_set)(struct sde_encoder_phys *encoder,
101 struct drm_display_mode *mode,
102 struct drm_display_mode *adjusted_mode);
103 void (*enable)(struct sde_encoder_phys *encoder);
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400104 void (*disable)(struct sde_encoder_phys *encoder);
Alan Kwongbb27c092016-07-20 16:41:25 -0400105 int (*atomic_check)(struct sde_encoder_phys *encoder,
106 struct drm_crtc_state *crtc_state,
107 struct drm_connector_state *conn_state);
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400108 void (*destroy)(struct sde_encoder_phys *encoder);
109 void (*get_hw_resources)(struct sde_encoder_phys *encoder,
Lloyd Atkinson11f34442016-08-11 11:19:52 -0400110 struct sde_encoder_hw_resources *hw_res,
111 struct drm_connector_state *conn_state);
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400112 int (*control_vblank_irq)(struct sde_encoder_phys *enc, bool enable);
113 int (*wait_for_commit_done)(struct sde_encoder_phys *phys_enc);
114 void (*prepare_for_kickoff)(struct sde_encoder_phys *phys_enc,
115 bool *wait_until_ready);
116 void (*handle_post_kickoff)(struct sde_encoder_phys *phys_enc);
Clarence Ip110d15c2016-08-16 14:44:41 -0400117 void (*trigger_start)(struct sde_encoder_phys *phys_enc);
118 bool (*needs_split_flush)(struct sde_encoder_phys *phys_enc);
Jayant Shekhar1d50ed22016-11-04 18:41:12 +0530119
120 void (*setup_misr)(struct sde_encoder_phys *phys_encs,
121 struct sde_misr_params *misr_map);
122 void (*collect_misr)(struct sde_encoder_phys *phys_enc,
123 struct sde_misr_params *misr_map);
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400124};
125
126/**
127 * enum sde_enc_enable_state - current enabled state of the physical encoder
128 * @SDE_ENC_DISABLED: Encoder is disabled
129 * @SDE_ENC_ENABLING: Encoder transitioning to enabled
130 * Events bounding transition are encoder type specific
131 * @SDE_ENC_ENABLED: Encoder is enabled
132 */
133enum sde_enc_enable_state {
134 SDE_ENC_DISABLED,
135 SDE_ENC_ENABLING,
136 SDE_ENC_ENABLED
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400137};
138
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400139/**
Dhaval Patel81e87882016-10-19 21:41:56 -0700140 * enum sde_intr_idx - sde encoder interrupt index
141 * @INTR_IDX_VSYNC: Vsync interrupt for video mode panel
142 * @INTR_IDX_PINGPONG: Pingpong done unterrupt for cmd mode panel
143 * @INTR_IDX_UNDERRUN: Underrun unterrupt for video and cmd mode panel
144 * @INTR_IDX_RDPTR: Readpointer done unterrupt for cmd mode panel
145 */
146enum sde_intr_idx {
147 INTR_IDX_VSYNC,
148 INTR_IDX_PINGPONG,
149 INTR_IDX_UNDERRUN,
150 INTR_IDX_RDPTR,
151 INTR_IDX_MAX,
152};
153
154/**
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400155 * struct sde_encoder_phys - physical encoder that drives a single INTF block
156 * tied to a specific panel / sub-panel. Abstract type, sub-classed by
157 * phys_vid or phys_cmd for video mode or command mode encs respectively.
158 * @parent: Pointer to the containing virtual encoder
Lloyd Atkinson55987b02016-08-16 16:57:46 -0400159 * @connector: If a mode is set, cached pointer to the active connector
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400160 * @ops: Operations exposed to the virtual encoder
161 * @parent_ops: Callbacks exposed by the parent to the phys_enc
162 * @hw_mdptop: Hardware interface to the top registers
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400163 * @hw_ctl: Hardware interface to the ctl registers
Alan Kwongbb27c092016-07-20 16:41:25 -0400164 * @hw_cdm: Hardware interface to the cdm registers
165 * @cdm_cfg: Chroma-down hardware configuration
Jeykumar Sankaranfdd77a92016-11-02 12:34:29 -0700166 * @hw_pp: Hardware interface to the ping pong registers
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400167 * @sde_kms: Pointer to the sde_kms top level
168 * @cached_mode: DRM mode cached at mode_set time, acted on in enable
Jayant Shekhar1d50ed22016-11-04 18:41:12 +0530169 * @misr_map: Interface for setting and collecting MISR data
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400170 * @enabled: Whether the encoder has enabled and running a mode
171 * @split_role: Role to play in a split-panel configuration
Clarence Ip03521982016-08-26 10:49:47 -0400172 * @intf_mode: Interface mode
Dhaval Patel81e87882016-10-19 21:41:56 -0700173 * @intf_idx: Interface index on sde hardware
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400174 * @spin_lock: Lock for IRQ purposes
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400175 * @enable_state: Enable state tracking
Alan Kwongbaa56352016-10-04 09:38:11 -0400176 * @vblank_refcount: Reference count of vblank request
Dhaval Patel81e87882016-10-19 21:41:56 -0700177 * @vsync_cnt: Vsync count for the physical encoder
178 * @underrun_cnt: Underrun count for the physical encoder
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400179 */
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400180struct sde_encoder_phys {
181 struct drm_encoder *parent;
Lloyd Atkinson55987b02016-08-16 16:57:46 -0400182 struct drm_connector *connector;
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400183 struct sde_encoder_phys_ops ops;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400184 struct sde_encoder_virt_ops parent_ops;
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400185 struct sde_hw_mdp *hw_mdptop;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400186 struct sde_hw_ctl *hw_ctl;
Alan Kwongbb27c092016-07-20 16:41:25 -0400187 struct sde_hw_cdm *hw_cdm;
188 struct sde_hw_cdm_cfg cdm_cfg;
Jeykumar Sankaranfdd77a92016-11-02 12:34:29 -0700189 struct sde_hw_pingpong *hw_pp;
Ben Chan78647cd2016-06-26 22:02:47 -0400190 struct sde_kms *sde_kms;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400191 struct drm_display_mode cached_mode;
Jayant Shekhar1d50ed22016-11-04 18:41:12 +0530192 struct sde_misr_params *misr_map;
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400193 enum sde_enc_split_role split_role;
Clarence Ip03521982016-08-26 10:49:47 -0400194 enum sde_intf_mode intf_mode;
Dhaval Patel81e87882016-10-19 21:41:56 -0700195 enum sde_intf intf_idx;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400196 spinlock_t spin_lock;
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400197 enum sde_enc_enable_state enable_state;
Alan Kwongbaa56352016-10-04 09:38:11 -0400198 atomic_t vblank_refcount;
Dhaval Patel81e87882016-10-19 21:41:56 -0700199 atomic_t vsync_cnt;
200 atomic_t underrun_cnt;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400201};
202
Ben Chan78647cd2016-06-26 22:02:47 -0400203/**
204 * struct sde_encoder_phys_vid - sub-class of sde_encoder_phys to handle video
205 * mode specific operations
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400206 * @base: Baseclass physical encoder structure
207 * @irq_idx: IRQ interface lookup index
Alan Kwonga172ef52016-09-27 00:29:10 -0400208 * @irq_cb: interrupt callback
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400209 * @hw_intf: Hardware interface to the intf registers
210 * @vblank_completion: Completion event signaled on reception of the vsync irq
Ben Chan78647cd2016-06-26 22:02:47 -0400211 */
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400212struct sde_encoder_phys_vid {
213 struct sde_encoder_phys base;
Dhaval Patel81e87882016-10-19 21:41:56 -0700214 int irq_idx[INTR_IDX_MAX];
Alan Kwonga172ef52016-09-27 00:29:10 -0400215 struct sde_irq_callback irq_cb[INTR_IDX_MAX];
Lloyd Atkinson5d722782016-05-30 14:09:41 -0400216 struct sde_hw_intf *hw_intf;
217 struct completion vblank_completion;
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400218};
219
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400220/**
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400221 * struct sde_encoder_phys_cmd - sub-class of sde_encoder_phys to handle command
222 * mode specific operations
223 * @base: Baseclass physical encoder structure
224 * @intf_idx: Intf Block index used by this phys encoder
225 * @stream_sel: Stream selection for multi-stream interfaces
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400226 * @pp_rd_ptr_irq_idx: IRQ signifying panel's frame read pointer
227 * For CMD encoders, VBLANK is driven by the PP RD Done IRQ
228 * @pp_tx_done_irq_idx: IRQ signifying frame transmission to panel complete
Alan Kwonga172ef52016-09-27 00:29:10 -0400229 * @irq_cb: interrupt callback
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400230 * @pp_tx_done_wq: Wait queue that tracks when a commit is flushed
231 * to hardware after the reception of pp_done
232 * Used to prevent back to back commits
233 * @pending_cnt: Atomic counter tracking the number of kickoffs vs.
234 * the number of pp_done irqs. Should hover between 0-2
235 * Incremented when a new kickoff is scheduled
236 * Decremented in pp_done irq
237 */
238struct sde_encoder_phys_cmd {
239 struct sde_encoder_phys base;
240 int intf_idx;
241 int stream_sel;
Dhaval Patel81e87882016-10-19 21:41:56 -0700242 int irq_idx[INTR_IDX_MAX];
Alan Kwonga172ef52016-09-27 00:29:10 -0400243 struct sde_irq_callback irq_cb[INTR_IDX_MAX];
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400244 wait_queue_head_t pp_tx_done_wq;
245 atomic_t pending_cnt;
246};
247
248/**
Alan Kwongbb27c092016-07-20 16:41:25 -0400249 * struct sde_encoder_phys_wb - sub-class of sde_encoder_phys to handle
250 * writeback specific operations
251 * @base: Baseclass physical encoder structure
252 * @hw_wb: Hardware interface to the wb registers
253 * @irq_idx: IRQ interface lookup index
254 * @wbdone_timeout: Timeout value for writeback done in msec
255 * @bypass_irqreg: Bypass irq register/unregister if non-zero
256 * @wbdone_complete: for wbdone irq synchronization
257 * @wb_cfg: Writeback hardware configuration
258 * @intf_cfg: Interface hardware configuration
259 * @wb_roi: Writeback region-of-interest
260 * @wb_fmt: Writeback pixel format
261 * @frame_count: Counter of completed writeback operations
262 * @kickoff_count: Counter of issued writeback operations
263 * @mmu_id: mmu identifier for non-secure/secure domain
264 * @wb_dev: Pointer to writeback device
265 * @start_time: Start time of writeback latest request
266 * @end_time: End time of writeback latest request
267 * @wb_name: Name of this writeback device
268 * @debugfs_root: Root entry of writeback debugfs
269 */
270struct sde_encoder_phys_wb {
271 struct sde_encoder_phys base;
272 struct sde_hw_wb *hw_wb;
273 int irq_idx;
Alan Kwonga172ef52016-09-27 00:29:10 -0400274 struct sde_irq_callback irq_cb;
Alan Kwongbb27c092016-07-20 16:41:25 -0400275 u32 wbdone_timeout;
276 u32 bypass_irqreg;
277 struct completion wbdone_complete;
278 struct sde_hw_wb_cfg wb_cfg;
279 struct sde_hw_intf_cfg intf_cfg;
280 struct sde_rect wb_roi;
281 const struct sde_format *wb_fmt;
282 u32 frame_count;
283 u32 kickoff_count;
284 int mmu_id[SDE_IOMMU_DOMAIN_MAX];
285 struct sde_wb_device *wb_dev;
286 ktime_t start_time;
287 ktime_t end_time;
288#ifdef CONFIG_DEBUG_FS
289 char wb_name[SDE_ENCODER_NAME_MAX];
290 struct dentry *debugfs_root;
291#endif
292};
293
294/**
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400295 * struct sde_enc_phys_init_params - initialization parameters for phys encs
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400296 * @sde_kms: Pointer to the sde_kms top level
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400297 * @parent: Pointer to the containing virtual encoder
298 * @parent_ops: Callbacks exposed by the parent to the phys_enc
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400299 * @split_role: Role to play in a split-panel configuration
300 * @intf_idx: Interface index this phys_enc will control
301 * @wb_idx: Writeback index this phys_enc will control
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400302 */
303struct sde_enc_phys_init_params {
304 struct sde_kms *sde_kms;
305 struct drm_encoder *parent;
306 struct sde_encoder_virt_ops parent_ops;
307 enum sde_enc_split_role split_role;
308 enum sde_intf intf_idx;
309 enum sde_wb wb_idx;
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400310};
311
312/**
313 * sde_encoder_phys_vid_init - Construct a new video mode physical encoder
314 * @p: Pointer to init params structure
Lloyd Atkinsone5c2c0b2016-07-05 12:23:29 -0400315 * Return: Error code or newly allocated encoder
316 */
317struct sde_encoder_phys *sde_encoder_phys_vid_init(
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400318 struct sde_enc_phys_init_params *p);
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400319
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400320/**
321 * sde_encoder_phys_cmd_init - Construct a new command mode physical encoder
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400322 * @p: Pointer to init params structure
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400323 * Return: Error code or newly allocated encoder
324 */
325struct sde_encoder_phys *sde_encoder_phys_cmd_init(
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400326 struct sde_enc_phys_init_params *p);
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400327
Alan Kwongbb27c092016-07-20 16:41:25 -0400328/**
329 * sde_encoder_phys_wb_init - Construct a new writeback physical encoder
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400330 * @p: Pointer to init params structure
Alan Kwongbb27c092016-07-20 16:41:25 -0400331 * Return: Error code or newly allocated encoder
332 */
333#ifdef CONFIG_DRM_SDE_WB
334struct sde_encoder_phys *sde_encoder_phys_wb_init(
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400335 struct sde_enc_phys_init_params *p);
Alan Kwongbb27c092016-07-20 16:41:25 -0400336#else
337static inline
338struct sde_encoder_phys *sde_encoder_phys_wb_init(
Lloyd Atkinson6ef6cb52016-07-06 11:49:18 -0400339 struct sde_enc_phys_init_params *p)
Alan Kwongbb27c092016-07-20 16:41:25 -0400340{
341 return NULL;
342}
343#endif
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400344
Alan Kwongbb27c092016-07-20 16:41:25 -0400345void sde_encoder_phys_setup_cdm(struct sde_encoder_phys *phys_enc,
346 struct drm_framebuffer *fb, const struct sde_format *format,
347 struct sde_rect *wb_roi);
Lloyd Atkinsona59eead2016-05-30 14:37:06 -0400348
Clarence Ip110d15c2016-08-16 14:44:41 -0400349/**
350 * sde_encoder_helper_trigger_start - control start helper function
351 * This helper function may be optionally specified by physical
352 * encoders if they require ctl_start triggering.
353 * @phys_enc: Pointer to physical encoder structure
354 */
355void sde_encoder_helper_trigger_start(struct sde_encoder_phys *phys_enc);
356
Lloyd Atkinson55987b02016-08-16 16:57:46 -0400357
358static inline enum sde_3d_blend_mode sde_encoder_helper_get_3d_blend_mode(
359 struct sde_encoder_phys *phys_enc)
360{
361 enum sde_rm_topology_name topology;
362
363 topology = sde_connector_get_topology_name(phys_enc->connector);
364 if (phys_enc->split_role == ENC_ROLE_SOLO &&
365 topology == SDE_RM_TOPOLOGY_DUALPIPEMERGE)
366 return BLEND_3D_H_ROW_INT;
367
368 return BLEND_3D_NONE;
369}
370
Lloyd Atkinson09fed912016-06-24 18:14:13 -0400371#endif /* __sde_encoder_phys_H__ */