Commit Graph

636807 Commits

Author SHA1 Message Date
memeka
d9183cd279 s5p-mfc: Copy timestamp and timecode in encoder 2017-03-20 08:35:22 -03:00
Mauro (mdrjr) Ribeiro
c713a3aa55 defconfig: extend bootloader cmdline and default cmdline
Change-Id: If5a5b31087ffb09e197f36c083ec15347a59292a
jenkins-deb_kernel_5422_4.9-17
2017-03-15 11:25:21 -03:00
Mauro (mdrjr) Ribeiro
fbb0686e33 net/usb: update r8152 to the latest version 2017-03-15 10:16:20 -03:00
Mauro (mdrjr) Ribeiro
44e409fb7b defconfig: lower CMA to 128MB
Change-Id: I41cd95a97b9228d4a3cd27c3717ea95f977857c4
2017-03-15 09:38:59 -03:00
Mauro (mdrjr) Ribeiro
8c71940e1d Merge branch 'odroidxu4-4.9.y' of github.com:hardkernel/linux into odroidxu4-4.9.y 2017-03-15 09:23:58 -03:00
Mauro (mdrjr) Ribeiro
8d5bc1e3ee Merge branch 'odroidxu4-4.9.y' 2017-03-15 09:23:38 -03:00
Mauro Ribeiro
32b77f0b5d Merge "ARM: dts: exynos5422-odroidxu3: clean up gpio-keys nodes" into odroidxu4-4.9.y 2017-03-15 21:22:54 +09:00
Mauro Ribeiro
820722e0aa Merge pull request #281 from mikraus94/patch-1
Allowed logitech game controllers
2017-03-15 09:20:53 -03:00
mikraus94
a47e49a625 Allowed logitech game controllers 2017-03-14 23:11:51 +01:00
Anand Moon
2309ffc7b1 ARM: dts: exynos5422-odroidxu3: clean up gpio-keys nodes
drop interrupt-parent and interrupts property
as it's not used by gpio-keys nodes.

Fixes: f841fe13911e8(ARM: dts: exynos5422-odroidxu3: Enable power key)

Change-Id: Ib07850a6d93dfe964f41d76932c57c99f7aecde1
2017-03-13 16:49:57 +05:30
Anand Moon
2ee821de7c net:wireless:rtl8812au: stop debug logs.
stop flooding of debug logs.

[   11.831873] RTW: module init start
[   11.831887] RTW: rtl8812au v5.1.5_19247.20160830
[   11.832124] RTW:
               usb_endpoint_descriptor(0):
[   11.832133] RTW: bLength=7
[   11.832141] RTW: bDescriptorType=5
[   11.832149] RTW: bEndpointAddress=81
[   11.832157] RTW: wMaxPacketSize=1024
[   11.832166] RTW: bInterval=0
[   11.832174] RTW: RT_usb_endpoint_is_bulk_in = 1
[   11.832182] RTW:
               usb_endpoint_descriptor(1):

Change-Id: I9f23e71247ae37e762e65003ac87934f03196787
2017-03-13 16:19:37 +05:30
Thibault Saunier
67837d4fb6 s5p-mfc: Handle 'v4l2_pix_format:field' in try_fmt and g_fmt
It is required by the standard that the field order is set by the
driver, default to NONE in case any is provided, but we can basically
accept any value provided by the userspace as we will anyway not
be able to do any deinterlacing.

In this patch we also make sure to pass the interlacing mode provided
by userspace from the output to the capture side of the device so
that the information is given back to userspace. This way it can
handle it and potentially deinterlace afterward.

Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>

Series-to: linux-kernel@vger.kernel.org
Series-cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>, Andi Shyti <andi.shyti@samsung.com>, Thibault Saunier <thibault.saunier@osg.samsung.com>, Shuah Khan <shuahkh@osg.samsung.com>, Inki Dae <inki.dae@samsung.com>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, Javier Martinez Canillas <javier@osg.samsung.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Kukjin Kim <kgene@kernel.org>, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki <s.nawrocki@samsung.com>, linux-media@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, linux-arm-kernel@lists.infradead.org, Ulf Hansson <ulf.hansson@linaro.org>
Cover-letter:
Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers

Hello,

This patchset fixes a few issues on the colorspace logic for the exynos-gsc
and s5p-mfc drivers.

We now handle the colorspace in those drivers, and make sure to respect user setting if
possible.

We also now set the 'v4l2_pix_format:field' if userspace passed ANY, and
replicate users value on the capture side.

This is the sixth version of the patch serie.

Best regards,

Thibault Saunier
END

Series-version: 6
Series-changes: 2
- Fix a silly build error that slipped in while rebasing the patches

Series-changes: 3
- Do not check values in the g_fmt functions as Andrzej explained in previous review

Series-changes: 5
- Just adapt the field and never error out.

Series-changes: 6
- Pass user output field value to the capture as the device is not
  doing any deinterlacing and thus decoded content will still be
  interlaced on the output.
2017-03-09 11:35:32 -03:00
Thibault Saunier
9403aeaf8a exynos-gsc: Use user configured colorspace if provided
Use colorspace provided by the user as we are only doing scaling and
color encoding conversion, we won't be able to transform the colorspace
itself and the colorspace won't mater in that operation.

Also always use output colorspace on the capture side.

If the user does not provide a colorspace do no make it up, we might
later while processing need to figure out the colorspace, which
is possible depending on the frame size but do not ever guess and
leak that guess to the userspace.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Series-changes: 3
- Do not check values in the g_fmt functions as Andrzej explained in previous review
- Added 'Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>'

Series-changes: 4
- Reword commit message to better back our assumptions on specifications

Series-changes: 5
- Squash commit to always use output colorspace on the capture side
  inside this one
- Fix typo in commit message

Series-changes: 6
- Do not ever guess colorspace
2017-03-09 11:35:29 -03:00
Marek Szyprowski
7f3f878710 During my research I found that some of the requirements for the memory buffers for MFC v6+ devices were blindly copied from the previous (v5) version and simply turned out to be excessive. The relaxed requirements are applied by the recent patches to the MFC driver and the driver is now fully functional even without the reserved memory blocks for all v6+ variants. This patch removes those reserved memory nodes from all boards having MFC v6+ hardware block.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
67d8fdd38d It turned out that all versions of MFC v6+ hardware doesn't have a strict requirement for ALL buffers to be allocated on higher addresses than the firmware base like it was documented for MFC v5. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Basing on this fact, the special DMA configuration based on two reserved memory regions is not really needed for MFC v6+ devices, because the memory requirements for the firmware, device and per-context buffers can be fulfilled by the simple probe-time pre-allocated block allocator instroduced in previous patch.
This patch enables support for such pre-allocated block based allocator
always for MFC v6+ devices. Due to the limitations of the memory management
subsystem the largest supported size of the pre-allocated buffer when no
CMA (Contiguous Memory Allocator) is enabled is 4MiB.

This patch also removes the requirement to provide two reserved memory
regions for MFC v6+ devices in device tree. Now the driver is fully
functional without them.

Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
9a09c76039 The main reason for using special configuration of IOMMU domain was the problem with MFC firmware, which failed to operate properly when placed at 0 DMA address. Instead of adding custom code for configuring each variant of IOMMU domain and architecture specific glue code, simply use what arch code provides and if the DMA base address equals zero, skip first 128 KiB to keep required alignment. This patch also make the driver operational on ARM64 architecture, because it no longer depends on ARM specific DMA-mapping and IOMMU glue code functions.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
2bf9e9f04a Current MFC driver depends on the fact that when IOMMU is available, the DMA-mapping framework and its IOMMU glue will use first-fit allocator. This was true for ARM architecture, but its not for ARM64 arch. However, in case of MFC v6+ hardware and latest firmware, it turned out that there is no strict requirement for ALL buffers to be allocated on higher addresses than the firmware base. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions.
Such relaxed requirements for the memory buffers can be easily fulfilled
by allocating firmware, device and per-context buffers from the probe-time
preallocated larger buffer. This patch adds support for it. This way the
driver finally works fine on ARM64 architecture. The size of the
preallocated buffer is 8 MiB, what is enough for three instances H264
decoders or encoders (other codecs have smaller memory requirements).
If one needs more for particular use case, one can use "mem" module
parameter to force larger (or smaller) buffer (for example by adding
"s5p_mfc.mem=16M" to kernel command line).

Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
5bd6e8b795 Move code for DMA memory configuration with IOMMU into separate function to make it easier to compare what is being done in each case.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
3b9a20dc3c Firmware for MFC v6+ variants is not larger than 400 KiB, so there is no need to allocate a full 1 MiB buffer for it. Reduce it to 512 KiB to keep proper alignment of allocated buffer.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
7866d65955 Once firmware buffer has been converted to use s5p_mfc_priv_buf structure, it is possible to allocate it with existing s5p_mfc_alloc_priv_buf() function. This change will help to reduce code variants in the next patches.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
bd8e44da9d o complete DMA memory configuration for MFC device, allocation of the firmware buffer is needed, because some parameters are dependant on its base address. Till now, this has been handled in the s5p_mfc_alloc_firmware() function. This patch moves that logic to s5p_mfc_configure_dma_memory() to keep DMA memory related operations in a single place. This way s5p_mfc_alloc_firmware() is simplified and does what it name says. The other consequence of this change is moving s5p_mfc_alloc_firmware() call from the s5p_mfc_probe() function to the s5p_mfc_configure_dma_memory().
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
2d54a695b8 Use s5p_mfc_priv_buf structure for keeping the firmware image. This will help handling of firmware buffer allocation in the next patches.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
fe59dc08f8 Setting DMA max segment size to 32 bit mask is a part of DMA memory configuration, so move those calls to s5p_mfc_configure_dma_memory() function.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
3dafb955c3 Change parameters for s5p_mfc_alloc_priv_buf() and s5p_mfc_release_priv_buf() functions. Instead of DMA device pointer and a base, provide common MFC device structure and memory bank context identifier.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
fbd8561d49 Internal MFC driver device structure contains two entries for keeping addresses of the DMA memory banks. Replace them with the dma_base[] array and use defines for accessing particular banks. This will help to simplify code in the next patches.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
29faddbeb3 Internal MFC driver device structure contains two pointers to devices used for DMA memory allocation: mem_dev_l and mem_dev_r. Replace them with the mem_dev[] array and use defines for accessing particular banks. This will help to simplify code in the next patches.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
87541760be Replace custom code with generic helper to retrieve driver data.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
f23daeb501 Remove unused structures, definitions and functions that are no longer called from the driver code.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
03d3abd163 media: s5p-mfc: Fix initialization of internal structures
Initialize members of the internal device and context structures as early
as possible to avoid access to uninitialized objects on initialization
failures. If loading firmware or creating of the hardware instance fails,
driver will access device or context queue in error handling path, which
might not be initialized yet, what causes kernel panic. Fix this by moving
initialization of all static members as early as possible.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Mauro (mdrjr) Ribeiro
d3d2fb3a7a defconfig: misc raid and fs support
Change-Id: I9c338cc8f0c186257d33a1303368ffbbb17ba8f5
2017-03-09 10:12:47 -03:00
Mauro (mdrjr) Ribeiro
e6eb150635 Merge branch 'odroidxu4-4.9.y' of github.com:hardkernel/linux into odroidxu4-4.9.y jenkins-deb_kernel_5422_4.9-16 2017-03-06 18:38:29 +09:00
Mauro Ribeiro
7e7e41daa5 Merge pull request #279 from OtherCrashOverride/xu4-g2d
ODROID-XU4: Enable G2D
2017-03-06 18:34:54 +09:00
Mauro Ribeiro
b041943538 Merge pull request #276 from OtherCrashOverride/xu4-gsc-next
Xu4 gsc next
2017-03-06 18:33:41 +09:00
Mauro Ribeiro
06ddf6e693 Merge pull request #275 from Emerald-Phoenix/thermal-patch
Enable per cpu thermal trips
2017-03-06 18:32:57 +09:00
Brian Kim
207680c3e9 s5p-cec: Use devm_clk_get() instead of clk_get()
Change to using the devm_clk_get() to get the clock and
have it automatically freed on exit.

Change-Id: I982792b6c8e463730d5e56af6661f2325155c47b
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
2017-03-06 12:10:04 +09:00
Brian Kim
f841fe1391 ARM: dts: exynos5422-odroidxu3: Enable power key
This changes enables the power button on the Exynos5422 Odroid-XU3/4
boards.

Change-Id: Iafd025be921da348797b6a510586abf3e47bfe75
Signed-off-by: Brian Kim <brian.kim@hardkernel.com>
2017-03-06 10:03:22 +09:00
OtherCrashOverride
72e0e3302e ODROID-XU4: Enable G2D 2017-03-05 07:33:38 +00:00
Javier Martinez Canillas
4dc432d022 exynos-gsc: Avoid spamming the log on VIDIOC_TRY_FMT
There isn't an ioctl to enum the supported field orders, so a user-space
application can call VIDIOC_TRY_FMT using different field orders to know
if one is supported. For example, GStreamer does this so during playback
dozens of the following messages appear in the kernel log buffer:

[ 442.143393] Not supported field order(4)

Instead of printing this as an error, just keep it as debug information.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:27:57 +00:00
Javier Martinez Canillas
0e5e57d687 exynos-gsc: Fix unbalanced pm_runtime_enable() error
Commit a006c04e62 ("[media] exynos-gsc: Fixup clock management at
->remove()") changed the driver's .remove function logic to fist do
a pm_runtime_get_sync() to make sure the device is powered before
attempting to gate the gsc clock.

But the commit also removed a pm_runtime_disable() call that leads
to an unbalanced pm_runtime_enable() error if the driver is removed
and re-probed:

exynos-gsc 13e00000.video-scaler: Unbalanced pm_runtime_enable!
exynos-gsc 13e10000.video-scaler: Unbalanced pm_runtime_enable!

Fixes: a006c04e62 ("[media] exynos-gsc: Fixup clock management at ->remove()")

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:27:39 +00:00
Shailendra Verma
7fd1633aea exynos-gsc: Clean up file handle in open() error path
The file handle is not yet added in the vfd list. So no need
to call v4l2_fh_del(&ctx->fh) if it fails to create controls.

Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:27:21 +00:00
Marek Szyprowski
c5e87b68cd exynos-gsc: Add support for Exynos5433 specific version
This patch adds support for Exynos5433 specific version of the GScaler
module. The main difference between Exynos 5433 and earlier is addition
of new clocks that have to be controlled.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:26:52 +00:00
Marek Szyprowski
8b7b4b04cd exynos-gsc: Use of_device_get_match_data() helper
Replace open-coded driver data extraction code with generic helper.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:26:32 +00:00
Marek Szyprowski
4abc5b06ee exynos-gsc: Add missing newline char in debug messages
Fix missing newline char in debug messages.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:26:12 +00:00
Marek Szyprowski
09cfc5f295 exynos-gsc: Remove unused lclk_freqency entry
Remove dead, unused code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:25:54 +00:00
Marek Szyprowski
df994d2fe8 exynos-gsc: Simplify system PM even more
System PM callbacks only ensure that device is runtime suspended/resumed,
so remove them and use generic pm_runtime_force_suspend/resume helper.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:25:32 +00:00
Ulf Hansson
a4e4fb5eb0 exynos-gsc: Simplify system PM
It's not needed to keep a local flag about the current system PM state.
Let's just remove that code and the corresponding debug print.

[mszyprow: rebased onto v4.9-rc4]

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:25:10 +00:00
Ulf Hansson
9a28dde6a8 exynos-gsc: Do full clock gating at runtime PM suspend
To potentially save more power in runtime PM suspend state, let's
also prepare/unprepare the clock from the runtime PM callbacks.

[mszyprow: rebased onto v4.9-rc4]

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:24:53 +00:00
Ulf Hansson
74c328765b exynos-gsc: Fixup clock management at ->remove()
To make sure the clock is fully gated in ->remove(), we first need to
to bring the device into full power by invoking pm_runtime_get_sync().

Then, let's both unprepare and disable the clock.

[mszyprow: rebased onto v4.9-rc4]

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:24:35 +00:00
Ulf Hansson
613fd898ba exynos-gsc: Make PM callbacks available conditionally
There are no need to set up the PM callbacks (runtime and system) unless
they are being used. It also causes compiler warnings about unused
functions.

Silence the warnings by making them available for CONFIG_PM (runtime
callbacks) and CONFIG_PM_SLEEP (system sleep callbacks).

[mszyprow: squashed two patches into one to avoid potential build
break, changed patch subject and updated commit message]

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:24:16 +00:00
Ulf Hansson
67ebf54ec0 exynos-gsc: Make driver functional when CONFIG_PM is unset
The driver depended on CONFIG_PM to be functional. Let's remove that
dependency, by enable the runtime PM resourses during ->probe() and
update the device's runtime PM status to reflect this.

[mszyprow: rebased onto v4.9-rc4]

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-04 01:23:59 +00:00