Commit graph

693995 commits

Author SHA1 Message Date
Xiangliang.Yu 4a70af406f drm/amdgpu/dce_virtual: remove error message for vega10
Vega10 also support virtual display, remove the error message.

Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-08-15 14:45:43 -04:00
Jason Ekstrand cf6e7bac63 drm/i915: Add support for drm syncobjs
This commit adds support for waiting on or signaling DRM syncobjs as
part of execbuf.  It does so by hijacking the currently unused cliprects
pointer to instead point to an array of i915_gem_exec_fence structs
which containe a DRM syncobj and a flags parameter which specifies
whether to wait on it or to signal it.  This implementation
theoretically allows for both flags to be set in which case it waits on
the dma_fence that was in the syncobj and then immediately replaces it
with the dma_fence from the current execbuf.

v2:
 - Rebase on new syncobj API
v3:
 - Pull everything out into helpers
 - Do all allocation in gem_execbuffer2
 - Pack the flags in the bottom 2 bits of the drm_syncobj*
v4:
 - Prevent a potential race on syncobj->fence

Testcase: igt/gem_exec_fence/syncobj*
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1499289202-25441-1-git-send-email-jason.ekstrand@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170815145733.4562-1-chris@chris-wilson.co.uk
2017-08-15 16:46:57 +01:00
Chris Wilson b805014897 drm/i915: Handle full s64 precision for wait-ioctl
The wait-ioctl is optionally supplied a timeout with nanosecond
precision in a s64 field. We use nsecs_to_jiffies64() to convert that
into the jiffies consumed by the scheduler, but internally
nsecs_to_jiffies64() does not guard against overflow (as it's purpose is
for use by the scheduler and not drivers!). So we must guard against the
overflow ourselves, and in the process note that we may then return
much earlier than the timeout selected by the user, so don't report
ETIME unless we do hit the timeout. (Woe betold us though if the user
waits for a year (32bit) and the request is still not complete!)

v2: Refine overflow detection (to not include an overffow itself)

Reported-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170811105731.9482-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-08-15 16:25:25 +01:00
Chris Wilson b8f55be644 drm/i915: Split obj->cache_coherent to track r/w
Another month, another story in the cache coherency saga. This time, we
come to the realisation that i915_gem_object_is_coherent() has been
reporting whether we can read from the target without requiring a cache
invalidate; but we were using it in places for testing whether we could
write into the object without requiring a cache flush. So split the
tracking into two, one to decide before reads, one after writes.

See commit e27ab73d17 ("drm/i915: Mark CPU cache as dirty on every
transition for CPU writes") for the previous entry in this saga.

v2: Be verbose
v3: Remove unused function (i915_gem_object_is_coherent)
v4: Fix inverted coherency check prior to execbuf (from v2)
v5: Add comment for nasty code where we are optimising on gcc's behalf.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101109
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101555
Testcase: igt/kms_mmap_write_crc
Testcase: igt/kms_pwrite_crc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Tested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170811111116.10373-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-08-15 15:46:57 +01:00
Lucas Stach 65375b873c drm/etnaviv: switch GEM allocations to __GFP_RETRY_MAYFAIL
Now that we have a GFP flags with the expected semantic of "try reasonably
hard to find memory, but don't OOM", we should start to use it.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2017-08-15 15:28:22 +02:00
Lucas Stach 5247e2aac5 drm/etnaviv: don't fail GPU bind when CONFIG_THERMAL isn't enabled
The stub functions returns -ENODEV when trying to register the cooling device,
thus failing the GPU bind, rendering the GPU subsystem unusable when
CONFIG_THERMAL isn't enabled.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2017-08-15 15:28:15 +02:00
Imre Deak 9c3a16c887 drm/i915/hsw+: Add support for multiple power well regs
Future platforms increase the number of power wells which require
additional control registers. A convenient way to select the correct
register is to use the high bits of the power well ID as index. This
patch only prepares for this, while upcoming platform enabling patches
will add the actual new power well IDs and corresponding power well
control registers.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Animesh Manna <animesh.manna@intel.com>
Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170814151530.24154-2-imre.deak@intel.com
2017-08-15 15:28:10 +03:00
Laurent Pinchart d874b3a7c4 drm: omapdrm: Remove dss_features.h
The header file only contains four macros, two of which are never used.
Move the other two to dss.h and remove dss_features.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 51919572c8 drm: omapdrm: Move supported outputs feature to dss driver
The supported outputs feature is specific to the DSS, move it from the
omap_dss_features structure to the dss driver.

The omap_dss_features structure is now empty and can be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 9f0fbaea5c drm: omapdrm: Move DSS_FCK feature to dss driver
The FEAT_PARAM_DSS_FCK feature is specific to the DSS, move it from the
omap_dss_features structure to the dss driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart c4ff6ea60e drm: omapdrm: Move PCD, LINEWIDTH and DOWNSCALE features to dispc driver
The FEAT_PARAM_DSS_PCD, FEAT_PARAM_LINEWIDTH and FEAT_PARAM_DOWNSCALE
features are specific to the DISPC, move them from the omap_dss_features
structure to the dispc driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart fe9964cb1e drm: omapdrm: Move FEAT_PARAM_DSI* features to dsi driver
The FEAT_PARAM_DSI* features are specific to the DSI, move them from the
omap_dss_features structure to the dsi driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 1ac0c89403 drm: omapdrm: Move FEAT_* features to dispc driver
All the remaining FEAT_* features are specific to the DISPC, move them
from the omap_dss_features structure to the dispc driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 4569ab757f drm: omapdrm: Move FEAT_LCD_CLK_SRC feature to dss_features structure
The FEAT_LCD_CLK_SRC feature is specific to the DSS, move it from the
omap_dss_features structure to the dss_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart d178e034d5 drm: omapdrm: Move FEAT_DPI_USES_VDDS_DSI feature to dpi code
The FEAT_DPI_USES_VDDS_DSI feature is specific to the DPI, move it from
the omap_dss_features structure to the dpi code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 2c9fc9bf45 drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver
The FEAT_HDMI_* features are specific to the HDMI4, move them from the
omap_dss_features structure to the hdmi4 driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 44d8ca1078 drm: omapdrm: Move FEAT_DSI_* features to dsi driver
The FEAT_DSI_* features are specific to the DSI, move them from the
omap_dss_features structure to the dsi driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 34dfb85f03 drm: omapdrm: Move FEAT_VENC_REQUIRES_TV_DAC_CLK to venc driver
The FEAT_VENC_REQUIRES_TV_DAC_CLK is specific to the VENC, move it from
the omap_dss_features structure to the venc driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 38dc07039c drm: omapdrm: Move reg_fields to dispc_features structure
The reg_fields feature describes DISPC registers only. Move it from the
omap_dss_features structure to the dispc_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 6d85d4adb6 drm: omapdrm: Move DISPC_CLK_SWITCH reg feature to struct dss_features
The register belongs to the DSS, move the feature to the dss_features
structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart acf591c6aa drm: omapdrm: Move num_ovls and num_mgrs to dispc_features structure
The num_ovls and num_mgrs are dispc features. Move them from the
omap_dss_features structure to the dispc_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart fcd4188894 drm: omapdrm: Move overlay caps features to dispc_features structure
The overlay_caps is a dispc feature. Move it from the omap_dss_features
structure to the dispc_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 94f96ad7c7 drm: omapdrm: Move color modes feature to dispc_features structure
The supported_color_modes is a dispc feature. Move it from the
omap_dss_features structure to the dispc_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 2855047474 drm: omapdrm: Move size unit features to dispc_features structure
The buffer_size_unit and burst_size_unit are dispc features. Move them
from the omap_dss_features structure to the dispc_features structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 74592ee796 drm: omapdrm: Move shutdown() handler from core to dss
In preparation for removal of the core module, move the shutdown()
handler from core to dss.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 11765d163c drm: omapdrm: Move all debugfs code from core to dss
debugfs code is spread between the core and dss drivers. In preparation
for removal of the core driver, move it all to the dss driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 4a9fab3d81 drm: omapdrm: dss: Initialize DSS internal features at probe time
The DSS internal features are derived from the platform device
compatible string which is available at probe time. Don't delay
initialization until bind time. This prepares for the merge of the two
DSS features structures that will be needed before the DSS is bound.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 24ab1df366 drm: omapdrm: dss: Use supported outputs instead of display types
The dss driver uses the supported display types to check whether the DSS
has SDI, VENC or HDMI outputs. We can instead use the supported outputs
the provide the same information. This removes the last use of the
supported display types, that we can then remove as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 18daeb8e97 drm: omapdrm: dss: Select features based on compatible string
Use the compatible string instead of the OMAP SoC revision to determine
device features. The various OMAP3-based SoCs can't be told apart using
the compatible string, use soc_device_match() to tell them apart.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart b8dab2bddb drm: omapdrm: dpi: Replace OMAP SoC model checks with DSS model
The DPI code only needs to differentiate between major OMAP revisions,
which can be obtained from the DSS compatible string. Replace the OMAP
SoC model checks to prepare for removal of the OMAP SoC version platform
data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 7a143a4b11 drm: omapdrm: dispc: Select features based on compatible string
Use the compatible string instead of the OMAP SoC revision to determine
device features. On OMAP34xx the features depend on the ES revision that
can not be determined from the compatible string. Use soc_device_match()
in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 493b683b8a drm: omapdrm: Don't forward set_min_bus_tput() to no-op platform code
The OMAP implementation of the set_min_bus_tput() API is a no-op.
There's no point in forwarding the driver calls to the platform code.
Remove the use of the related platform data callback, but keep the
internal function as a reminder that the feature will need to be
implemented when the OMAP platform will provide support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 9e1305d0d1 drm: omapdrm: dsi: Handle pin muxing internally
Don't rely on callback functions provided by the platform, but access
the syscon internally to mux the DSI pins.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 742e693b06 drm: omapdrm: dsi: Store DSI model and PLL hardware data in OF data
The DSI PLL hardware data and DSS channels are selected based on the
OMAP SoC model. There's no need for fine-grained model information, as
the driver only needs to differentiate between OMAP3, OMAP4 and OMAP5.
As this can be done through the DSI compatible string, store the
corresponding information in OF match data instead to avoid accessing
the OMAP SoC model.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart fecea2528d drm: omapdrm: dss: Split operations out of dss_features structure
Move the two function pointers to a new dss_ops structure. This will
allow merging the dss_features and omap_dss_features structures without
having to expose the DPI source selection and LCD clock muxing functions
in header files.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart cc219afa18 drm: omapdrm: hdmi: Store PHY features in PHY data structure
PHY features are stored in a global variable, while they should be
properties of the PHY object. As existing OMAP platforms have a single
HDMI PHY this doesn't cause any issue, but doesn't follow the driver
model.

Move the PHY features to the HDMI PHY data structure to follow the
driver model and pave the road for multiple HDMI PHYs support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart d696430758 drm: omapdrm: venc: Don't export omap_dss_pal_vm and omap_dss_ntsc_vm
The two variables are never used outside of their compilation unit, make
them static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart e65837b5b2 drm: omapdrm: dpi: Remove unneeded regulator check
The dpi_display_enable() function ensures that a VDDS_DSI regulator is
available if the DSI uses the VDDS_DSI supply. This is not needed, as a
failure to get the VDDS_DSI supply will result in a probe failure,
dpi_display_enable() will thus never be called in that case.

Remove the check, and replace tests for the FEAT_DPI_USES_VDDS_DSI
feature with a test for the regulator object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart afed19e46e drm: omapdrm: panel-dpi: Remove unneeded check for OF node
As non-DT booting is no longer supported, the only way to instantiate
the device is through an OF node, which is guaranteed to be present.
Remove the unneeded check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 2782d41f28 drm: omapdrm: connector-analog-tv: Remove unneeded check for OF node
As non-DT booting is no longer supported, the only way to instantiate
the device is through an OF node, which is guaranteed to be present.
Remove the unneeded check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart fb8862fa03 drm: omapdrm: acx565akm: Remove unneeded check for OF node
As non-DT booting is no longer supported, the only way to instantiate
the device is through an OF node, which is guaranteed to be present.
Remove the unneeded check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Laurent Pinchart 07e72f9a3f ARM: OMAP2+: Register SoC device attributes from machine .init()
SoC device attributes are registered with a call to
soc_device_register() from the machine .init_late() operation, which is
called from the late initcall, after all drivers built-in drivers have
been probed. This results in the impossibility for drivers to use SoC
device matching in their probe function.

The omap_soc_device_init() function is safe to call from the machine
.init() operation, as all data it depends on is initialized from the
.init_early() operation. Move SoC device attribute registration to
machine .init() like on all other ARM platforms.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Arvind Yadav 3af0b843e5 drm/omap: panel-dsi-cm: constify attribute_group structures.
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

File size before:
  text	   data	    bss	    dec	    hex	filename
   4669	    464	      0	   5133	   140d	panel-dsi-cm.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   4725	    400	      0	   5125	   1405	panel-dsi-cm.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Arvind Yadav 35a3919f63 drm/omap: panel-sony-acx565akm: constify attribute_group structures.
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   5147	    560	      0	   5707	   164b	panel-sony-acx565akm.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   5211	    496	      0	   5707	   164b	panel-sony-acx565akm.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Arvind Yadav b68ed480d5 drm/omap: constify attribute_group structures.
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   2673	    368	      0	   3041	    be1	panel-tpo-td043mtea1.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   2721	    304	      0	   3025	    bd1	panel-tpo-td043mtea1.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Arvind Yadav 815ed41b9b drm/omap: dma-buf: Constify dma_buf_ops structures.
dma_buf_ops are not supposed to change at runtime. All functions
working with dma_buf_ops provided by <linux/dma-buf.h> work with
const dma_buf_ops. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   1240	    112	      0	   1352	    548 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   1352	      0	      0	   1352	    548 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Julia Lawall fd4ba2ec50 drm/omap: omap_display_timings: constify videomode structures
The videomode structures are only copied into the vm field of a
panel_drv_data structure, so they can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Peter Ujfalusi 232ce608ff drm/omap: displays: encoder-tpd12s015: Support for hot plug detection
Use interrupt handler for hpd GPIO to react to HPD changes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Peter Ujfalusi c9741b4379 drm/omap: displays: connector-hdmi: Support for hot plug detection
If the hpd_gpio is valid, use interrupt handler to react to HPD changes.
In case the hpd_gpio is not valid, try to enable hpd detection on the
encoder if it supports it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00
Peter Ujfalusi 3c5968002b drm/omap: Support for HDMI hot plug detection
The HPD signal can be used for detecting HDMI cable plug and unplug event
without the need for polling the status of the line.
This will speed up detecting such event because we do not need to wait for
the next poll event to notice the state change.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2017-08-15 15:18:25 +03:00