drm: Check mode object lease status in all master ioctl paths [v4]
Attempts to modify un-leased objects are rejected with an error.
Information returned about unleased objects is modified to make them
appear unusable and/or disconnected.
Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:
* With the change in the __drm_mode_object_find API to pass the
file_priv along, we can now centralize most of the lease-based
access checks in that function.
* A few places sk...
drm: Add drm_object lease infrastructure [v5]
This provides new data structures to hold "lease" information about drm mode
setting objects, and provides for creating new drm_masters which have access to
a subset of the available drm resources.
An 'owner' is a drm_master which is not leasing the objects from another
drm_master, and hence 'owns' them.
A 'lessee' is a drm_master which is leasing objects from some other drm_master.
Each lessee holds the set of objects which it is leasing from ...
drm: Pass struct drm_file * to __drm_mode_object_find [v2]
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.
v2: Also fix up vboxvideo driver in staging
[airlied: merging early as this is an API change]
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
drm: Add new LEASE debug level
Separate out lease debugging from the core.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
MLK-16748-03: dts: Add fsl-imx8mq-evk-drm.dts for drm driver
Enable DCSS DRM and HDMI DRM driver.
Disable DCSS Framebuffer and HDMI Framebuffer driver.
Set IMX8MQ_CLK_DISP_APB_SRC source from IMX8MQ_SYS2_PLL_125M temporary,
will be set back to IMX8MQ_SYS1_PLL_800M
after DCSS APB clock affect HDMI Core clock issue resolved on B0 SOC.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
MLK-16748-02: HDMI: Support iMX8MQ HDMI in HDMI DRM driver
-Add iMX8MQ HDMI function support in iMX8 HDMI DRM driver.
-EDID read function supported for iMX8MQ.
-Move iMX8QM clock management functions and pixel link
setting functions to iMX8QM SOC specific struct.
-replace printk with pr_info, dev_warn and dev_err.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
PM / Runtime: Defer resuming of the device in pm_runtime_force_resume()
When the pm_runtime_force_suspend|resume() helpers were invented, we still
had CONFIG_PM_RUNTIME and CONFIG_PM_SLEEP as separate Kconfig options.
To make sure these helpers worked for all combinations and without
introducing too much of complexity, the device was always resumed in
pm_runtime_force_resume().
More precisely, when CONFIG_PM_SLEEP was set and CONFIG_PM_RUNTIME was
unset, we needed to resume the device as t...
MLK-16757-2 can: flexcan: implement runtime pm
Implement runtime PM which will:
1) Keep device in suspend state (clocks disabled) if it's not openned
2) Make Power Domain framework be able to shutdown the corresponding power
domain of this device.
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
MLK-16757-1 can: flexcan: disable clocks during suspend
Flexcan will be stopped during suspend if no wakeup function required
and enabled after resume accordingly. During this period, we could
explicitly disable clocks.
We do this by moving the clk_prepare_enable/clk_disable_unprepare into
flexcan_chip_start and flexcan_chip_stop functions which will be called
during suspend/resume function.
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
MLK-16735 usb: host: add XHCI_CDNS_HOST flag
The NXP Cadence XHCI host has the same issue with Intel's,
it is triggered by reboot test, the test case is described
at this jira ticket.
BuildInfo:
- SCFW 8dcff26, IMX-MKIMAGE ea027c4b, ATF
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g6dc7b0f
Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
MLK-16738: ARM64: dts: qxp-mek: amix: move SAIs MCLKs to AUD_PLL1
Move AMIX SAIs MCLKs to AUD_PLL1 and double the frequency
in order to support 64k rate.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
MLK-16775-2 usb: xhci: plat: only do high bus freq for runtime pm
Remove xhci_suspend and xhci_resume as i.MX8MQ dwc3 can't support it,
add high bus request and release, and enable runtime pm by default.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
usb: host: plat: Enable xHCI plat runtime PM
Enable the xHCI plat runtime PM for parent device to suspend/resume
xHCI. Also call pm_runtime_forbid() in probe() function to force users
to explicitly enable runtime pm using power/control in sysfs, in case
some parent devices didn't implement runtime PM callbacks.
[set do_wakeup to true when runtime suspending -Mathias]
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-b...
usb: xhci: plat: Enable async suspend/resume
USB host controllers can take a significant amount of time to suspend
and resume, adding several hundred miliseconds to the kernel resume
time. Since the XHCI controller has no outside dependencies (other than
clocks, which are suspended late/resumed early), allow it to suspend and
resume asynchronously.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Andrew Bresticker <abrestic@chromium.org>
Tested-by: Robert Foss <robert.fos...
MLK-16775-1 usb: dwc3: gadget: add high bus freq support
Add high bus request for connection to host in reset handling,
and high bus release for disconnection.
Signed-off-by: Li Jun <jun.li@nxp.com>
MGS-3349 [#ccc] [imx8qm] Met segmentation fault when run GLES samples stress on GPU0, GPU1 and bridged mode
cma limit feature is for gpu/dpu/vpu buffer sharing,
cma preempt feature is required for gpu mmu table setup.
remove cma limit flag for video memory since imx8 g2d use ion.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
MLK-16738: ASoC: fsl: amix: move SAIs MCLKs to AUD_PLL1
Move AMIX SAIs MCLKs to AUD_PLL1 and double the frequency
in order to support 64k rate.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Revert "MLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates"
This reverts commit 0cc882c2d72c ("MLK-16738: ASoC: fsl: amix: remove
support for 64k and 96k rates").
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16347-14: arm64: dts: fsl-imx8qxp-mek: Enable mipi-dsi with adv7535
Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QXP MEK
development board.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-13: arm64: dts: fsl-imx8qxp-lpddr4-arm2: Enable mipi-dsi with adv7535
Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QXP LPDDR4
development board.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-12: arm64: dtsi: fsl-imx8qxp: Add mipi-dsi specific nodes
Add support for mipi-dsi DRM driver in DTS files for i.MX8qxp
platform.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-11: clk: imx: imx8qxp: Add missing MIPI DSI clocks
Add missing clocks for MIPI-DSI SS: RX_ESC and TX_ESC
Also added the posibility to select clock parents for MIPI-DSI versus
LVDS.
The SCFW was changed, so now the LVDS pixel and phy clocks need to
specify their parrents.
Also, the TX_ESC and RX_ESC clocks from MIPI-DSI need to specify their
parrents in DTS files.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
MLK-16347-10: arm64: defconfig: Change ADV7511 driver from module to built-in
Make the ADV7511 drm bridge driver as built-in, so the path MIPI-DSI to
ADV7535 will be available by default.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-9: arm64: defconfig: Build in NWL IMX DSI driver
Enable the MIPI-DSI drm driver as built-in in defconfig.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-8: arm64: dts: fsl-imx8qm-lpddr4-arm2: Enable mipi-dsi with adv7535
Enable the MIPI-DSI to ADV7535 DSI2HDMI converter path on the MX8QM LPDDR4
development board.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-7: arm64: dtsi: fsl-imx8qm: Add mipi-dsi specific nodes
Add support for mipi-dsi DRM driver in DTS files for i.MX8qm platform.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-6: gpu: drm: bridge: adv7511: Add new compatible string
Added "adi,adv7535" to the adv7511 drm bridge and adi,adv7511.txt doc,
since the driver can also support the ADV7535 chipset (upgrade of ADV7533).
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-5: gpu: imx: dpu: TCON adjustment
The DPU TCON register regarding hsync/vsync are incorrectly
initialized. So, adjust vsync start to align with hsync start.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-4: drm/imx: Add mipi-dsi driver for mx8
Add support for the NorthWest Logic MIPI-DSI controller found
in the following i.MX8 platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
This is the MIPI-DSI encoder containing the platform specific changes
and it uses the NWL MIPI-DSI bridge.
Currently only qm and qxp are tested with this driver. The mq support
will be added later.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-3: drm/bridge: Add Northwest Logic DSI transmitter support
Add support for the NorthWest Logit MIPI-DSI controller found in mx8
platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
The NWL MIPI-DSI driver is implemented as a DRM bridge.
The MIPI-DSI encoder will contain the platform specific changes and will
use this bridge.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-2: Documentation: devicetree: Added nwl to vendor-prefixes
Added nwl to Documentation in vendor-prefixes.txt, since a new driver
from Nortwest Logic was added to devicetree.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16347-1: phy: add phy driver for mipi-dsi on mx8
Implement the DPHY from MIPI-DSI found on i.MX8 platforms (QM, QXP and MQ)
as a phy driver.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
MLK-16776 staging: typec: tcpci: use vbus from partner for EXTCON_USB
Change to use the vbus from partner to notify EXTCON_USB.
This is to work around the case of source only typec port
connecting to Host PC via a Rp fixed cable.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
MLK-16786: dma: mxs-dma: fix the unbalanced runtime pm counter
mxs-dma init function will call runtime pm init, the redundant
pm_runtime_force_resume will mess up the counter. Also remove some
unnecessary code.
BuildInfo:
- SCFW 66189d08, IMX-MKIMAGE ea027c4b, ATF
- U-Boot 2017.03-imx_4.9.51_8qm_beta1_8qxp_alpha+g325ac1e
Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
MLK-16738: ASoC: fsl: amix: remove support for 64k and 96k rates
Remove support for 64k and 96k rates due to SAI MCLK freq limitations.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
MLK-16675-5: drm: imx: dcss: fix BLKCTL for B0 silicon
B0 silicon brings some changes in the BLKCTL registers that need to be
properly used for B0 to work. This patch adds support for that.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
MLK-16675-3: drm: imx: register mscale DCSS driver with IMX DRM core
To be used, the iMX8M DCSS driver has to be "registered" with the IMX
DRM core.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
MLK-16675-1: drm: imx: add mscale DCSS core driver
This patch adds base suport for i.MX8M's Display Controller
subsystem(DCSS). It has built-in DPR, Scaler and HDR10 modules. Also, it
features a video Decompression and Tile to Raster Conversion (DTRC) unit,
as well as a graphics pixel decompression infrastracture (DEC400D).
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
MLK-16713 i2c: imx-lpi2c: add runtime pm support
- Add runtime pm support to dynamicly manage the ipg and per clocks.
- Put the suspend to suspend_noirq.
- Call .pm_runtime_force_suspend() to force runtime pm suspended
in .suspend_noirq().
BuildInfo:
- SCFW 88456c73, IMX-MKIMAGE 06bc2767, ATF a438801
- U-Boot 2017.03-imx_v2017.03_4.9.51_imx8_beta1+g7953d47
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang...
MLK-16782 net: fec: double check the mii interrupt status
Double check the mii interrupt status during mdio bus accessing
to avoid interrupt lost in timeout case.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
MLK-16781 net: fec: add eee mode tx lpi support
The i.MX8MQ ENET version support IEEE802.3az eee mode, add
eee mode tx lpi enable to support ethtool interface.
usage:
1. set sleep and wake timer to 5ms:
ethtool --set-eee eth0 eee on tx-lpi on tx-timer 5000
2. check the eee mode:
~# ethtool --show-eee eth0
EEE Settings for eth0:
EEE status: enabled - active
Tx LPI: 5000 (us)
Supported EEE link modes: 100baseT/Full
1000baseT/Full
...
MLK-16742-4: ASoC: imx-cs42888: fix DAPM routes
ASRC DAPM routes not needed when ASRC node is not specified.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>