Commit graph

572839 commits

Author SHA1 Message Date
Clarence Ip
ed93daaea7 drm/msm/sde: enable ping pong split support
Add support for using a single layer mixer to drive two video
or command mode interfaces. This configuration frees up one of
the layer mixer paths for other use cases/displays.

Change-Id: I3a0ca07e37f121bf56ea8984c0cca25af7bc647e
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-12-13 10:04:04 -05:00
Jeykumar Sankaran
4f7d7c780e Merge "ARM: dts: msm: enable imgswap on sharp nt35597 dual panel" into dev/msm-4.4-drm_kms 2016-12-09 12:59:21 -08:00
Jeykumar Sankaran
0566f9bd1d Merge "drm/msm: implement smmu detach and guard freeing of client dev" into dev/msm-4.4-drm_kms 2016-12-09 12:58:05 -08:00
Jeykumar Sankaran
27a3c65291 Merge "ARM: dts: msm: default sde clock rate to max for msm8996" into dev/msm-4.4-drm_kms 2016-12-09 12:57:39 -08:00
Lloyd Atkinson
a3af61badf ARM: dts: msm: enable imgswap on sharp nt35597 dual panel
Fix stride corruption issue due to panel portswap observed when
some video layers cross panel split boundaries. Fix is to
initialize panel with the imgswap feature enabled, and then
modify the DSI CTRL horizontal tiling mapping to undo the swap.

Change-Id: I34ba42a0cb61d560629dc8e4c5a27fa5847f4e20
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-12-08 13:50:32 -05:00
Jeykumar Sankaran
e2af552e65 Merge "drm/msm/sde: update pixel extension uapi" into dev/msm-4.4-drm_kms 2016-12-05 10:49:06 -08:00
Clarence Ip
3f2e6b7130 drm/msm/sde: remove catalog parsing limits
This patch removes the previous limit of MAX_BLOCKS from the
number of recognized key entries, and cleans up the catalog
parsing logic to remove a number of arrays from the call stack.

Change-Id: I926367296960daaf82978b0c4ce53f67dcb36ed2
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-12-01 16:01:07 -05:00
abeykun
98a396274b drm/msm/sde: update pixel extension uapi
Patch changes pixel extension uapi to match FB driver and exposes
QSEED3 filter configuration defines.

Change-Id: Id5dba041df77d1c663742fcda74f420ca3d228f9
Signed-off-by: abeykun <abeykun@codeaurora.org>
2016-12-01 14:59:54 -05:00
Clarence Ip
7f9aedc870 drm/msm/sde: enable master physical encoder last
Update the way in which the virtual encoder requests the physical
encoder enables so that the master physical encoder is always
enabled last. This is done so that all of the slaves are fully
prepared when the master is enabled, and also allows the master
to update any necessary configuration during its enable callback.

Change-Id: Iff0d9cd08f8589889b50974fbc9819d96a15ab63
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-12-01 11:53:54 -05:00
Lloyd Atkinson
c7ef2fa309 drm/msm/sde: reset ctl mixer config at end of use case
Need to take the control path out of any source split or other
configuration at the end of a use case to prepare for the next
client.

Change-Id: I9a2fb57dcafc576a23a13da1906a44e9992aeb74
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-30 14:53:47 -08:00
Gopikrishnaiah Anandan
871197cafa drm/msm: Support virtualization of color processing properties
During device probe virtual crtcs are created with no hardware attached.
Color processing(cp) properties can be attached to the virtual crtc by
looking at the hardware catalog. If user-space client sets property cp
driver will check if hardware has been allocated for crtc. If there is
no hardware allocated it will return error for set property

Change-Id: I9662ebb51a4a9f79b6a1e8769f01391eaf06e313
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-11-30 14:52:31 -08:00
Dhaval Patel
f9abbb43e5 Merge "drm/msm/sde: reset kickoff count atomically before irq enable" into dev/msm-4.4-drm_kms 2016-11-30 14:50:44 -08:00
Benet Clark
ae08f7bb71 drm/msm/sde: Move DSPP/SSPP color process hw programming to common location
The color processing blocks for SSPP and DSPP share the same register
programming sequences. This change moves the current DSPP and SSPP
functionality to a common location and uses the helper function for
common code.

Change-Id: I0f41453a977ba2d3b4ce12cc622706619c48280c
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-11-30 11:33:48 -08:00
Benet Clark
c9c5ccb7e7 drm/msm/sde: Add support for Memory Color in plane
Add support for skin, sky, and foliage memory color hardware in
planes which have color processing hardwares.

Change-Id: I9ec72f44f36939cae90215bc668f3186d140e8b8
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-11-30 11:33:42 -08:00
Benet Clark
199f759f35 drm/msm/sde: Add PA global adjustment properties to plane
Add support for hue, saturation, intensity, and contrast adjustment
in planes that have color processing support.

Change-Id: I4c794deb7a5a1c0cc30cc0d64fbffd967eb1d399
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-11-30 11:33:22 -08:00
Lloyd Atkinson
b1b6408bcf drm/msm: implement smmu detach and guard freeing of client dev
Provide a basic implementation of msm_smmu_detach. Check
that smmu client_dev exists before doing
platform_device_unregister.

Change-Id: Ied1481003d878af452d3b00b950b234c6b7dd698
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-30 11:10:54 -08:00
Lloyd Atkinson
943fb1d9ad drm/msm/sde: reset kickoff count atomically before irq enable
Rework physical encoder kickoff counting logic to address issues
where an interrupt could be missed, or completion could get out
of sync due to a race condition between kickoff count and irq
enable. It also generalizes the kickoff count across the video
and command interfaces.

Change-Id: Id88f5b2859f74ee1aced8fbd7552e9023155d01c
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-29 17:26:48 -05:00
Lloyd Atkinson
23c3a69ba2 ARM: dts: msm: default sde clock rate to max for msm8996
Start SDE clock rate at maximum value to be compatible with
generic clients who do not have capability to set per-use case
fine tuned clock values.

Change-Id: I7afaa9e7358fe750d45e86eebc40f47f18f486c8
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-29 17:11:25 -05:00
Lloyd Atkinson
f547c0a044 drm/msm/sde: base scaler phase on decimated dimensions
Fix the pipe scaler phase calculations to use the width and
height after decimation is taken into account. This fixes
issues where decimation is required to scale past what is
possible with scaler alone.

Change-Id: I813fae32625ae3e85489ad96540599efcf5a1a29
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-29 14:28:12 -05:00
Dhaval Patel
cae546695a Merge "drm: Increase max number of DRM object properties" into dev/msm-4.4-drm_kms 2016-11-29 10:12:56 -08:00
Dhaval Patel
be24191c2e Merge "drm/msm/sde: check for missed irqs in command encoder" into dev/msm-4.4-drm_kms 2016-11-29 09:26:08 -08:00
Dhaval Patel
346ccc010f Merge "drm/msm/sde: move sde hw init to hw_init callback" into dev/msm-4.4-drm_kms 2016-11-29 09:25:37 -08:00
Dhaval Patel
e2ae664027 Merge "drm/msm: support probe deferral in msm_drv" into dev/msm-4.4-drm_kms 2016-11-29 09:25:07 -08:00
Dhaval Patel
3498bf131f Merge "drm/msm/sde: fix iounmap usage and init callflow" into dev/msm-4.4-drm_kms 2016-11-29 09:24:49 -08:00
Dhaval Patel
5449d1253e Merge "drm/msm/sde: fixup sde_kms shutdown sequence and naming" into dev/msm-4.4-drm_kms 2016-11-29 09:24:31 -08:00
Dhaval Patel
07b6d2ceb7 Merge "drm/msm/sde: fix cmd mode vblank irq control" into dev/msm-4.4-drm_kms 2016-11-27 14:39:09 -08:00
Clarence Ip
3537e5234a drm/msm/sde: move sde hw init to hw_init callback
Callbacks from the upper layer expect hardware initialization
logic to reside within the hw_init callback. Consolidate all hw
initialization to the hw_init callback and update the deinit and
destroy callbacks to match it.

Change-Id: I2ab32edae0e8586ddb4701b3d8c5cfde9e611cad
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-11-25 13:33:39 -05:00
Lloyd Atkinson
e25a594c35 drm/msm/sde: check for missed irqs in command encoder
Modify the way that the waiting for previous kickoffs is handled
for the command encoder case. Instead of doing waiting in the
virtual encoder, do the waiting in the command encoder directly.
That way we can check whether we have missed the IRQ. Also
allows waiting for idle before disabling the encoder.

Change-Id: I6cdb9c961a0ffd8e9ea2aaf1ad9686757edd7142
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-24 14:15:11 -05:00
Lloyd Atkinson
857addaf00 drm/msm: support probe deferral in msm_drv
Make fixes to support probe deferral in msm_drv, display
manager, and sde_kms. Move initialization logic out of msm_drv
probe and into load call so it is paired with unload.

Change-Id: I9330d61de8f6188cb0e9769d569d5cff841cb159
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-24 13:22:30 -05:00
Lloyd Atkinson
74502bdbd8 drm/msm/sde: fix iounmap usage and init callflow
Fix iounmap usage to properly use devm_iounmap. Fix clearing of
pointers in failure callflows of sde_kms init.

Change-Id: Ib42134ee972c578070ac513c3e4da37faec7d0cd
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-24 13:22:30 -05:00
Lloyd Atkinson
aa82c5fad3 drm/msm/sde: fixup sde_kms shutdown sequence and naming
Improve sde kms error detection and handling during
initialization.

Make naming of functions consistent within sde_kms file.

Change-Id: Ia8946752e7d89d811a46cd4725b2e43e02b9fd39
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-24 13:22:29 -05:00
Lloyd Atkinson
e0dbb43938 drm/msm/sde: fix cmd mode vblank irq control
Fix previous merge conflict that disabled the pingpong done irq
on vblank off instead of the pingpong read pointer as intended.

Change-Id: I707437b54f2878d0da7b0d3b5618fdafa0ff38d5
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-24 13:22:28 -05:00
Clarence Ip
d42ca87d05 drm/msm/sde: apply correct zpos range for sde clients
Maximum value of zpos should be maxblendstages-1 and not max
blend stages.

Change-Id: I0d991dea29c77cff672f5fd5564e750cafd18e60
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-11-23 11:13:53 -05:00
Benet Clark
9c89407f8c drm: Increase max number of DRM object properties
The maximum number of properties that can be created for a DRM
object needs to be increased.

Change-Id: Ic0f6d9ec73a6071dbb397b924a4389a9afb81bdc
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-11-22 14:34:57 -08:00
Lloyd Atkinson
194211db5d drm/msm/sde: add debug dump and panic facility
Add facility to trigger a dump of logs, and optionally trigger
a panic. To be used on detection of unrecoverable error detected
from within the SDE driver.

Change-Id: If1b48b1dcba21d9747cf85a5de027d694ae4a645
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-18 12:26:39 -08:00
Lloyd Atkinson
b6f15c90b6 drm/msm/sde: match xlog features in evtlog
Upgrade event log facility with xlog feature set which supports
variable arguments and other features required. evtlog now
registers debugfs at /sys/kernel/debug/dri/0/evtlog. It can be
enabled by echo 1 into the enable node, and dumped using the
dump node. Move evtlog support into sde layer since only sde
uses it.

Change-Id: I51f8577a0e626ab53601e07a16cefe8da90125e1
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
2016-11-18 12:26:29 -08:00
Dhaval Patel
90607cb04f Merge "drm/msm/sde: Add device tree subnode parsing capability" into dev/msm-4.4-drm_kms 2016-11-15 21:36:50 -08:00
Jayant Shekhar
a916143b87 drm/msm/sde: add debugfs support for misr data
This change adds a debugfs node to enable the misr
crc generation in batch mode. Once this is enabled,
driver will collect the crc numbers during each of
the interfaces interrupt.

To enable/disable the crc generation, respectively:

echo 1 16 > /d/dri0/encoder18/misr_data
echo 0 16 > /d/dri0/encoder18/misr_data

Inputs here represents enable and number of frame in batch.
Maximum batch size supported is 16.

To collect the crc data generated:

cat /d/dri0/encoder18/misr_data

Change-Id: I0a431b1ceff0425bec10d8739ad07a7b706b5f57
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-11-15 15:34:25 +05:30
Benet Clark
55bd068e86 drm/msm/sde: Add device tree subnode parsing capability
This change adds the capability for parsing a device tree subnode
of the SDE. For example, the DSPP's will be enumerated in the SDE
top-level DTSI node. The hardware blocks inside the DSPP will be
enumerated in a subnode in the DTSI.

Change-Id: If0cf37fac2388ab385b0bf416f40436e12d9395b
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-11-14 17:54:11 -08:00
Dhaval Patel
8bce9799ad Merge "drm/msm/sde: Add backlight class support for sde drm driver" into dev/msm-4.4-drm_kms 2016-11-14 16:58:55 -08:00
Sandeep Panda
7124a4ae49 drm/msm: create separate commit thread for each display
This change creates separate threads for commit on each
display, so that one display commit is not blocked on
other display's commit. Hence improving performance in
multi display use cases.

Change-Id: Ibd0dae1da53ec3a72de8b96c3c03ce51830cb4f9
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-11-14 08:42:12 -08:00
Vishnuvardhan Prodduturi
2d488ea7ed drm/msm/sde: Add backlight class support for sde drm driver
Add backlight class support for sde drm driver which provides
sysfs interface to userspace to control display brightness.

Change-Id: I4f777618e8f2ff61e72beddb7a5bd1fa6e9dd5df
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2016-11-14 10:39:22 +05:30
Alan Kwong
bcc085a8fa drm/msm/sde: add common sde debug folder
Create common debug folder to collect sde debug information.

Change-Id: I899ee56a0e97c33c622c46977232ddf70938fba8
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-11-11 16:07:24 -05:00
Alan Kwong
09a2231dfe drm/msm/sde: route evtlog to sde trace log
DRM and other components are using trace log for event capture.
In order to correlate events between DRM and SDE, route evtlog
capture to trace log for combined tracing.

Change-Id: I910111c4b79953edb2dbc4548bceff8d4d56728a
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-11-11 16:07:21 -05:00
Alan Kwong
9151c70036 drm/msm/sde: add systrace compatible trace macro
Add systrace compatible trace macro to log begin/end
and counter events.  This is useful for correlating
user mode and kernel events.

Change-Id: I6c5108fb8ddacc36b51ba2541d32541dd28856e2
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-11-11 16:07:17 -05:00
Alan Kwong
df86a7b92a drm/msm/sde: separate plane/encoder/crtc functions into headers
Currently, plane/encoder/crtc function prototypes reside in the
kms header. To improve code separation and reduce overlap changes,
separate plane/encoder/crtc functions from kms header into their
corresponding headers.

Change-Id: Id3a7098ada887538ac0635f381c553a516237e7a
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-11-11 16:07:14 -05:00
Dhaval Patel
57e7b8e0a3 Merge "drm/msm/sde: print error only if catalog property is mandatory" into dev/msm-4.4-drm_kms 2016-11-11 12:11:46 -08:00
Dhaval Patel
3ba84a7305 Merge "drm/msm/sde: remove redundant vblank request in crtc" into dev/msm-4.4-drm_kms 2016-11-11 12:11:35 -08:00
Dhaval Patel
113b255bab Merge "drm/msm/sde: add vblank reference counting to crtc" into dev/msm-4.4-drm_kms 2016-11-11 12:11:24 -08:00
abeykun
3516a56095 drm/msm/sde: add default 10 bit csc matrix to source pipe
Source pipe color space conversion block is used to convert YUV to RGB.
Patch adds logic to apply default 10-bit or 8-bit limited Rec601
matrix when user space doesn`t specify csc matrix. 10 or 8 bit matrix
is applied based on hw capabilities.

Change-Id: Iac805e1474223cd2840d2d928b5c71f5d47ce014
Signed-off-by: abeykun <abeykun@codeaurora.org>
2016-11-11 06:15:12 -08:00