On Wed, Apr 08, 2020 at 01:59:17PM +0200, Christoph Hellwig wrote:
> If this code was broken for non-coherent caches a crude powerpc hack
> isn't going to help anyone else. Remove the hack as it is the last
> user of __vmalloc passing a page protection flag other than PAGE_KERNEL.
Well Ben added this to make stuff work on ppc, ofc the home grown dma
layer in drm from back then isn't going to work in other places. I guess
should have at least an ack from him, in case anyone still …
[View More]cares about
this on ppc. Adding Ben to cc.
-Daniel
>
> Signed-off-by: Christoph Hellwig <hch(a)lst.de>
> ---
> drivers/gpu/drm/drm_scatter.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c
> index ca520028b2cb..f4e6184d1877 100644
> --- a/drivers/gpu/drm/drm_scatter.c
> +++ b/drivers/gpu/drm/drm_scatter.c
> @@ -43,15 +43,6 @@
>
> #define DEBUG_SCATTER 0
>
> -static inline void *drm_vmalloc_dma(unsigned long size)
> -{
> -#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
> - return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL));
> -#else
> - return vmalloc_32(size);
> -#endif
> -}
> -
> static void drm_sg_cleanup(struct drm_sg_mem * entry)
> {
> struct page *page;
> @@ -126,7 +117,7 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
> return -ENOMEM;
> }
>
> - entry->virtual = drm_vmalloc_dma(pages << PAGE_SHIFT);
> + entry->virtual = vmalloc_32(pages << PAGE_SHIFT);
> if (!entry->virtual) {
> kfree(entry->busaddr);
> kfree(entry->pagelist);
> --
> 2.25.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
[View Less]
This adds initial support for the NWL MIPI DSI Host controller found on i.MX8
SoCs.
It adds support for the i.MX8MQ but the same IP core can also be found on e.g.
i.MX8QXP. I added the necessary hooks to support other imx8 variants but since
I only have imx8mq boards to test I omitted the platform data for other SoCs.
The code is based on NXPs BSP so I added Robert Chiras as Co-authored-by.
The most notable changes over the BSP driver are
- Calculate HS mode timing from …
[View More]phy_configure_opts_mipi_dphy
- Perform all clock setup via DT
- Merge nwl-imx and nwl drivers
- Add B0 silion revision quirk
- become a bridge driver to hook into mxsfb / dcss
imx-display-subsystem so it makes sense to make it drive a bridge for dsi as
well).
- Use panel_bridge to attach the panel
- Use multiplex framework instead of accessing syscon directly
This has been tested on a Librem 5 devkit using mxsfb with Robert's patches[1]
and the mainline rocktech-jh057n00900 DSI panel driver on next-20200317 and on
the Librem5 with the a Mantix MLAF057WE51-X DSI panel driver (not yet mainline)
The DCSS (submitted for mainline inclusion now too) can also act as input
source.
Changes from v10:
- Per review comments by Sam Ravnborg
https://lore.kernel.org/dri-devel/20200318214639.GA971@ravnborg.org/
- Drop header-test-y since kernel lost support
- Handle drm_bridge_attach's new flags argument
- Add Acked-by: to binding patch, thanks!
- Move to next-20200319
Changes from v9:
- Per review comments by Robert Chiras
https://lore.kernel.org/dri-devel/1575366594.6423.61.camel@nxp.com/
- don't mix DSI host and bridge initialization
- only select output source once
- defer probe when panel is not ready to fix usage as a module
- use correct reset sequence as described by Robert
(and provided by NWL)
- use mode->clock instead of mode->crtc_clock
- Add tested by from Martin Kepplinger, thanks!
- Drop platform specific data (as suggested previously by Laurent Pinchart and
Andrzej Hajda) since imx8q* needs another set of abstractions with the new
reset sequence and that's easier to do when adding imx8q* support rather then
adding wrong abstraction now.
- Update bindings to use proper clock and irq names to make the example match
reality more closely.
- Use `fallthrough;` instead of /* Fall through */ in switch statements
- Move to next-20200226
Changes from v8:
- Drop reset quirk. It's not needed with mxsfb and sometimes triggers a shifted display.
Changes from v7:
- Per review comments by Andrzej Hajda
https://lore.kernel.org/linux-arm-kernel/c86b7ca2-7799-eafd-c380-e4b5515208…
- Drop spare empty line
- handle nwl_dsi_write errors
- better handle read errors
- unwind in case of error in nwl_dsi_enable
- use bridge_to_dsi() instead of accessing driver_private
- don't log on -EPROBEDEFER when fething the reset controller
- use endpoint number to determine input
- Spotted by kbuild test robot <lkp(a)intel.com>
https://lore.kernel.org/linux-arm-kernel/201909230644.qfSKbNf9%25lkp@intel.…
Use signed return type for nwl_dsi_get_dpi_pixel_format
- Drop connector type from drm_panel_bridge_add
- Don't forget to set an error value on dsi reads
Changes from v5:
- Per review comments by Andrzej Hajda
https://lists.freedesktop.org/archives/dri-devel/2019-September/235281.html
- Fix include file ordering
- Add a comment to nwl_dsi_platform_data that will allow to add support
at least for the i.MX8QM
- Merge driver into a single file plus the register defs in a separate header
- Make more functions and structs static
Changes from v4:
- Collect Reviewed-by: from Rob Herring, thanks!
https://lists.freedesktop.org/archives/dri-devel/2019-September/233979.html
- Spotted by kbuild test robot <lkp(a)intel.com>
https://lists.freedesktop.org/archives/dri-devel/2019-September/233860.htmlhttps://lists.freedesktop.org/archives/dri-devel/2019-September/233863.html
- fix format string for size_t
- Use DIV64_U64_ROUND_UP to fix build on 32 bit architectures
We can't use simple shift sind d and n are similar in size and
we need full precision
- Fix debug cfg_t_post debug print out
- Avoid PSEC_PER_SEC
- Move timeout / overflow handling out of nwl_dsi_finish_transmission,
it would never end up being reported since the call to the function
was guarded by flags.
- Drop 'support for' from KConfig title to make it match the other
drivers in that submenu
Changes from v3:
- Per review comments by Robert Chiras
https://lists.freedesktop.org/archives/dri-devel/2019-August/232580.html
- Add Robert's {Signed-off,Tested}-by:
- Respect number of lanes when calculting bandwidth limits
- Drop duplicate NWL_DSI_ENABLE_MULT_PKTS setup
- Per testing by Rober Chiras
https://lists.freedesktop.org/archives/dri-devel/2019-August/233688.html
- Drop duplicate (and too early) drm_bridge_add() in nwl_dsi_probe() that
made mxsfb fail to connect to the bridge since the panel_bridge was not up
yet. drm_bridge_add() happens in nwl_dsi_host_attach() where after the
panel_bridge was set up.
- Per review comments by Rob Herring on bindings
https://lists.freedesktop.org/archives/dri-devel/2019-August/233196.html
- drop description from power-domains and resets
- allow BSD 2 clause license as well
- make ports more specific
- add #address-cells, #size-cells as required
- use additionalProperties
- panel is of type object
Changes from v2:
- Per review comments by Rob Herring
https://lists.freedesktop.org/archives/dri-devel/2019-August/230448.html
- bindings:
- Simplify by restricting to fsl,imx8mq-nwl-dsi
- document reset lines
- add port@{0,1}
- use a real compatible string for the panel
- resets are required
- Per review comments by Arnd Bergmann
https://lists.freedesktop.org/archives/dri-devel/2019-August/230868.html
- Don't access iomuxc_gpr regs directly. This allows us to drop the
first patch in the series with the iomuxc_gpr field defines.
- Per review comments by Laurent Pinchart
Fix wording in bindings
- Add mux-controls to bindings
- Don't print error message on dphy probe deferral
Changes from v1:
- Per review comments by Sam Ravnborg
https://lists.freedesktop.org/archives/dri-devel/2019-July/228130.html
- Change binding docs to YAML
- build: Don't always visit imx-nwl/
- build: Add header-test-y
- Sort headers according to DRM convention
- Use drm_display_mode instead of videmode
- Per review comments by Fabio Estevam
https://lists.freedesktop.org/archives/dri-devel/2019-July/228299.html
- Don't restrict build to ARCH_MXC
- Drop unused includes
- Drop unreachable code in imx_nwl_dsi_bridge_mode_fixup()
- Drop remaining calls of dev_err() and use DRM_DEV_ERR()
consistently.
- Use devm_platform_ioremap_resource()
- Drop devm_free_irq() in probe() error path
- Use single line comments where sufficient
- Use <linux/time64.h> instead of defining USEC_PER_SEC
- Make input source select imx8 specific
- Drop <asm/unaligned.h> inclusion (after removal of get_unaligned_le32)
- Drop all EXPORT_SYMBOL_GPL() for functions used in the same module
but different source files.
- Drop nwl_dsi_enable_{rx,tx}_clock() by invoking clk_prepare_enable()
directly
- Remove pointless comment
- Laurent Pinchart
https://lists.freedesktop.org/archives/dri-devel/2019-July/228313.htmlhttps://lists.freedesktop.org/archives/dri-devel/2019-July/228308.html
- Drop (on iMX8MQ) unused csr regmap
- Use NWL_MAX_PLATFORM_CLOCKS everywhere
- Drop get_unaligned_le32() usage
- remove duplicate 'for the' in binding docs
- Don't include unused <linux/clk-provider.h>
- Don't include unused <linux/component.h>
- Drop dpms_mode for tracking state, trust the drm layer on that
- Use pm_runtime_put() instead of pm_runtime_put_sync()
- Don't overwrite encoder type
- Make imx_nwl_platform_data const
- Use the reset controller API instead of open coding that platform specific
part
- Use <linux/bitfield.h> intead of making up our own defines
- name mipi_dsi_transfer less generic: nwl_dsi_transfer
- ensure clean in .remove by calling mipi_dsi_host_unregister.
- prefix constants by NWL_DSI_
- properly format transfer_direction enum
- simplify platform clock handling
- Don't modify state in mode_fixup() and use mode_set() instead
- Drop bridge detach(), already handle by nwl_dsi_host_detach()
- Drop USE_*_QUIRK() macros
- Drop (for now) unused clock defnitions. 'pixel' and 'bypass' clock will be
used for i.MX8 SoCs but since they're unused atm drop the definitions - but
keep the logic to enable/disable several clocks in place since we know we'll
need it in the future.
Changes from v0:
- Add quirk for IMQ8MQ silicon B0 revision to not mess with the
system reset controller on power down since enable() won't work
otherwise.
- Drop devm_free_irq() handled by the device driver core
- Disable tx esc clock after the phy power down to unbreak
disable/enable (unblank/blank)
- Add ports to dt binding docs
- Select GENERIC_PHY_MIPI_DPHY instead of GENERIC_PHY for
phy_mipi_dphy_get_default_config
- Select DRM_MIPI_DSI
- Include drm_print.h to fix build on next-20190408
- Drop some debugging messages
- Newline terminate all DRM_ printouts
- Turn component driver into a drm bridge
[0]: https://lists.freedesktop.org/archives/dri-devel/2019-May/219484.html
[1]: https://patchwork.freedesktop.org/series/62822/
Guido Günther (2):
dt-bindings: display/bridge: Add binding for NWL mipi dsi host
controller
drm/bridge: Add NWL MIPI DSI host controller support
.../bindings/display/bridge/nwl-dsi.yaml | 216 +++
drivers/gpu/drm/bridge/Kconfig | 16 +
drivers/gpu/drm/bridge/Makefile | 1 +
drivers/gpu/drm/bridge/nwl-dsi.c | 1218 +++++++++++++++++
drivers/gpu/drm/bridge/nwl-dsi.h | 144 ++
5 files changed, 1595 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/bridge/nwl-dsi.yaml
create mode 100644 drivers/gpu/drm/bridge/nwl-dsi.c
create mode 100644 drivers/gpu/drm/bridge/nwl-dsi.h
--
2.23.0
[View Less]
Inside dma-fence-chain, we use a cmpxchg on an RCU-protected pointer. To
avoid the sparse warning for using the RCU pointer directly, we have to
cast away the __rcu annotation. However, we don't need to use void*
everywhere and can stick to the dma_fence*.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
---
drivers/dma-buf/dma-fence-chain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/…
[View More]drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
index 44a741677d25..3d123502ff12 100644
--- a/drivers/dma-buf/dma-fence-chain.c
+++ b/drivers/dma-buf/dma-fence-chain.c
@@ -62,7 +62,8 @@ struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)
replacement = NULL;
}
- tmp = cmpxchg((void **)&chain->prev, (void *)prev, (void *)replacement);
+ tmp = cmpxchg((struct dma_fence __force **)&chain->prev,
+ prev, replacement);
if (tmp == prev)
dma_fence_put(tmp);
else
--
2.20.1
[View Less]
This is intended to be the last patch series. I'll apply these trough
drm-misc-next tomorrow.
Changes since v8:
- "dt-bindings: display: ti,k2g-dss: Add dt-schema yaml binding"
- Remove ports-node from the dts example in
- "drm/tidss: New driver for TI Keystone platform Display SubSystem"
- Rename dispc_write_irqenable() to dispc_set_irqenable() to avoid
conflict exported omapfb function with same name.
- Add Signed-off-by: Tomi Valkeinen <tomi.valkeinen(a)ti.com>
- "…
[View More]MAINTAINERS: add entry for tidss"
- Add Signed-off-by: Tomi Valkeinen <tomi.valkeinen(a)ti.com>
Changes since v7:
- "drm/tidss: New driver for TI Keystone platform Display SubSystem"
- Remove idle debug prints from dispc_init()
- Add Reviewed-by: Benoit Parrot <bparrot(a)ti.com>
- "MAINTAINERS: add entry for tidss"
- Add Reviewed-by: Benoit Parrot <bparrot(a)ti.com>
Changes since v6:
- Rebase on top of drm-misc-next-2020-01-10
- Fix all checkpatch.pl -q --emacs --strict --show-types issues
- all issues but these have been fixed:
- over 80 char lines in scale coefficients found in tidss_scale_coefs.c
- Co-developed-by and Signed-off-by: name/email do not match
- added, moved or deleted file(s), does MAINTAINERS need updating
- Add Acked-by: Sam Ravnborg <sam(a)ravnborg.org> to "drm/tidss: New driver ..."
Changes since v5:
- Add Add Reviewed-by: from Rob Herring <robh(a)kernel.org> and
Benoit Parrot <bparrot(a)ti.com> to binding patches
- Color property changes and fixes to the driver implementation patch
- Check CTM and gamma support from dispc_features when creating crtc
- Implement CTM support for k2g and fix k3 CTM implementation
- Remove gamma property persistence and always write color properties
in a new modeset
Changes since v4:
- itemize named resource property descriptions in dt binding
- fix wp to wb in the ti,j721e-dss reg property description
- remove fifo underflow irq handling, it is not an error and
it should be used for debug purposes only
- memory tuning, prefetch plane fifo up to high-threshold value to
minimize possibility of underflows.
Changes since v3:
- Add descriptions some yaml binding properites
- Remove redundant minItems directives from yaml bindings
- Remove ports node from ti,k2g-dss yaml binding
- no change to MAINTAINERS or to the driver code
Changes since v2:
- Add version history to commit messages
- Fix yaml bindings now that got dt_binding_check dtbs_check working property
- Move tidss entry in MAINTAINERS after omapdrm and add "T: git
git://anongit.freedesktop.org/drm/drm-misc"
- no change to driver code
Changes since the first version of the patch series [2]:
- "drm/tidss: New driver for TI Keystone platform Display SubSystem"
- rebased on top of drm-next-2019-11-27
- sort all include lines in all files
- remove all include <drm/drmP.h>
- remove select "select VIDEOMODE_HELPERS"
- call dispc_vp_setup() later in tidss_crtc_atomic_flush() (there is no
to call it in new modeset case as it is also called in vp_enable())
- change probe sequence and drm_device allocation (follow example in drm_drv.c)
- use __maybe_unused instead of #ifdef for pm functions
- remove "struct drm_fbdev_cma *fbdev;" from driver data
- check panel connector type before connecting it
- No change to binding or MAINTAINERS patches
There was couple of attempts upstream an earlier version of this
driver about a year ago [1]. Back then I needed to stop my efforts to
implement support for next Keystone DSS version, so now the driver
supports three different Keystone DSS version on three different SoCs.
I am starting the patch series versioning from the beginning because it
has been over a year since the previous patch set and the structure of
the driver has evolved quite a bit. However, all the earlier comments
should be addressed in this series.
[1] https://patchwork.freedesktop.org/series/44947/
[2] https://lists.freedesktop.org/archives/dri-devel/2019-November/246542.html
Jyri Sarha (5):
dt-bindings: display: ti,k2g-dss: Add dt-schema yaml binding
dt-bindings: display: ti,am65x-dss: Add dt-schema yaml binding
dt-bindings: display: ti,j721e-dss: Add dt-schema yaml binding
drm/tidss: New driver for TI Keystone platform Display SubSystem
MAINTAINERS: add entry for tidss
.../bindings/display/ti/ti,am65x-dss.yaml | 152 +
.../bindings/display/ti/ti,j721e-dss.yaml | 208 ++
.../bindings/display/ti/ti,k2g-dss.yaml | 106 +
MAINTAINERS | 11 +
drivers/gpu/drm/Kconfig | 2 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/tidss/Kconfig | 14 +
drivers/gpu/drm/tidss/Makefile | 12 +
drivers/gpu/drm/tidss/tidss_crtc.c | 377 +++
drivers/gpu/drm/tidss/tidss_crtc.h | 46 +
drivers/gpu/drm/tidss/tidss_dispc.c | 2768 +++++++++++++++++
drivers/gpu/drm/tidss/tidss_dispc.h | 132 +
drivers/gpu/drm/tidss/tidss_dispc_regs.h | 243 ++
drivers/gpu/drm/tidss/tidss_drv.c | 285 ++
drivers/gpu/drm/tidss/tidss_drv.h | 39 +
drivers/gpu/drm/tidss/tidss_encoder.c | 88 +
drivers/gpu/drm/tidss/tidss_encoder.h | 17 +
drivers/gpu/drm/tidss/tidss_irq.c | 146 +
drivers/gpu/drm/tidss/tidss_irq.h | 77 +
drivers/gpu/drm/tidss/tidss_kms.c | 249 ++
drivers/gpu/drm/tidss/tidss_kms.h | 15 +
drivers/gpu/drm/tidss/tidss_plane.c | 217 ++
drivers/gpu/drm/tidss/tidss_plane.h | 25 +
drivers/gpu/drm/tidss/tidss_scale_coefs.c | 202 ++
drivers/gpu/drm/tidss/tidss_scale_coefs.h | 22 +
25 files changed, 5454 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
create mode 100644 Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
create mode 100644 Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
create mode 100644 drivers/gpu/drm/tidss/Kconfig
create mode 100644 drivers/gpu/drm/tidss/Makefile
create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.c
create mode 100644 drivers/gpu/drm/tidss/tidss_crtc.h
create mode 100644 drivers/gpu/drm/tidss/tidss_dispc.c
create mode 100644 drivers/gpu/drm/tidss/tidss_dispc.h
create mode 100644 drivers/gpu/drm/tidss/tidss_dispc_regs.h
create mode 100644 drivers/gpu/drm/tidss/tidss_drv.c
create mode 100644 drivers/gpu/drm/tidss/tidss_drv.h
create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.c
create mode 100644 drivers/gpu/drm/tidss/tidss_encoder.h
create mode 100644 drivers/gpu/drm/tidss/tidss_irq.c
create mode 100644 drivers/gpu/drm/tidss/tidss_irq.h
create mode 100644 drivers/gpu/drm/tidss/tidss_kms.c
create mode 100644 drivers/gpu/drm/tidss/tidss_kms.h
create mode 100644 drivers/gpu/drm/tidss/tidss_plane.c
create mode 100644 drivers/gpu/drm/tidss/tidss_plane.h
create mode 100644 drivers/gpu/drm/tidss/tidss_scale_coefs.c
create mode 100644 drivers/gpu/drm/tidss/tidss_scale_coefs.h
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
[View Less]
Hi Dave, Daniel,
Here's this week round of drm-misc-next-fixes
Maxime
drm-misc-next-fixes-2020-04-09:
A few DMA-related fixes, an OOB fix for virtio and a probe-related fix for
analogix_dp
The following changes since commit 0e7e6198af28c1573267aba1be33dd0b7fb35691:
Merge branch 'ttm-transhuge' of git://people.freedesktop.org/~thomash/linux into drm-next (2020-04-03 09:07:49 +1000)
are available in the Git repository at:
git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-next-…
[View More]fixes-2020-04-09
for you to fetch changes up to 152cce0006abf7e17dfb7dc94896b044bda4e588:
drm/bridge: analogix_dp: Split bind() into probe() and real bind() (2020-04-09 10:29:35 +0200)
----------------------------------------------------------------
A few DMA-related fixes, an OOB fix for virtio and a probe-related fix for
analogix_dp
----------------------------------------------------------------
Chris Wilson (1):
drm/legacy: Fix type for drm_local_map.offset
Jiri Slaby (1):
drm/virtio: fix OOB in virtio_gpu_object_create
Marek Szyprowski (2):
drm/prime: fix extracting of the DMA addresses from a scatterlist
drm/bridge: analogix_dp: Split bind() into probe() and real bind()
Maxime Ripard (1):
Merge drm/drm-next into drm-misc-next-fixes
.../bindings/display/panel/panel-dpi.yaml | 10 ------
.../bindings/display/ti/ti,am65x-dss.yaml | 4 +--
.../bindings/display/ti/ti,j721e-dss.yaml | 4 +--
.../devicetree/bindings/display/ti/ti,k2g-dss.yaml | 4 +--
drivers/dma-buf/Kconfig | 11 ++++---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 33 ++++++++++++-------
drivers/gpu/drm/drm_mm.c | 8 +----
drivers/gpu/drm/drm_prime.c | 37 +++++++++++++++-------
drivers/gpu/drm/exynos/exynos_dp.c | 29 ++++++++++-------
drivers/gpu/drm/panel/panel-simple.c | 11 -------
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 36 +++++++++++----------
drivers/gpu/drm/vboxvideo/vbox_drv.c | 4 +++
drivers/gpu/drm/vc4/vc4_hdmi.c | 20 +++++++++---
drivers/gpu/drm/virtio/virtgpu_object.c | 14 ++++----
drivers/gpu/drm/xen/xen_drm_front.c | 2 +-
drivers/video/fbdev/core/fbcon.c | 3 ++
include/drm/bridge/analogix_dp.h | 5 +--
include/drm/drm_legacy.h | 2 +-
18 files changed, 132 insertions(+), 105 deletions(-)
[View Less]
On configurations with 64-bit dma_addr_t but 32-bit resource_size_t,
there is now a warning:
drivers/gpu/drm/drm_bufs.c: In function 'drm_addmap_core':
drivers/gpu/drm/drm_bufs.c:328:8: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
328 | &map->offset,
| ^~~~~~~~~~~~
| |
| resource_size_t * {aka unsigned int *}
In file included from include/linux/pci-dma-compat.h:8,
…
[View More] from include/linux/pci.h:2392,
from include/drm/drm_pci.h:35,
from drivers/gpu/drm/drm_bufs.c:46:
include/linux/dma-mapping.h:642:15: note: expected 'dma_addr_t *' {aka 'long long unsigned int *'} but argument is of type 'resource_size_t *' {aka 'unsigned int *'}
642 | dma_addr_t *dma_handle, gfp_t gfp)
| ~~~~~~~~~~~~^~~~~~~~~~
I have no idea if this is safe on targets that may need a high DMA address,
or why we store a DMA address token in a resource_size_t in the first place,
but using a temporary variable avoids the warning.
Fixes: 8e4ff9b56957 ("drm: Remove the dma_alloc_coherent wrapper for internal usage")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
drivers/gpu/drm/drm_bufs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index dcabf5698333..0fbe65c62f1e 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -149,6 +149,7 @@ static int drm_addmap_core(struct drm_device *dev, resource_size_t offset,
{
struct drm_local_map *map;
struct drm_map_list *list;
+ dma_addr_t dma_addr;
unsigned long user_token;
int ret;
@@ -325,8 +326,9 @@ static int drm_addmap_core(struct drm_device *dev, resource_size_t offset,
* need to point to a 64bit variable first. */
map->handle = dma_alloc_coherent(&dev->pdev->dev,
map->size,
- &map->offset,
+ &dma_addr,
GFP_KERNEL);
+ map->offset = (resource_size_t)dma_addr;
if (!map->handle) {
kfree(map);
return -ENOMEM;
--
2.26.0
[View Less]
Hi Jon,
I have a large list of patches this time for the Documentation/. So, I'm
starting sending them a little earier. Yet, those are meant to be applied
after the end of the merge window. They're based on today's linux-next,
with has only 49 patches pending to be applied upstream touching
Documentation/, so I don't expect much conflicts if applied early at
-rc cycle.
Most of the patches here were already submitted, but weren't
merged yet at next. So, it seems that nobody picked them yet.
…
[View More]In any case, most of those patches here are independent from
the others.
The number of doc build warnings have been rising with time.
The main goal with this series is to get rid of most Sphinx warnings
and other errors.
Patches 1 to 5: fix broken references detected by this tool:
./scripts/documentation-file-ref-check
The other patches fix other random errors due to tags being
mis-interpreted or mis-used.
You should notice that several patches touch kernel-doc scripts.
IMHO, some of the warnings are actually due to kernel-doc being
too pedantic. So, I ended by improving some things at the toolset,
in order to make it smarter. That's the case of those patches:
docs: scripts/kernel-doc: accept blank lines on parameter description
scripts: kernel-doc: accept negation like !@var
scripts: kernel-doc: proper handle @foo->bar()
The last 4 patches address problems with PDF building.
The first one address a conflict that will rise during the merge
window: Documentation/media will be removed. Instead of
just drop it from the list of PDF documents, I opted to drop the
entire list, as conf.py will auto-generate from the sources:
docs: LaTeX/PDF: drop list of documents
Also, right now, PDF output is broken due to a namespace conflict
at I2c (two pdf outputs there will have the same name).
docs: i2c: rename i2c.svg to i2c_bus.svg
The third PDF patch is not really a fix, but it helps a lot to identify
if the build succeeded or not, by placing the final PDF output on
a separate dir:
docs: Makefile: place final pdf docs on a separate dir
Finally, the last one solves a bug since the first supported Sphinx
version, with also impacts PDF output: basically while nested tables
are valid with ReST notation, the toolset only started supporting
it on PDF output since version 2.4:
docs: update recommended Sphinx version to 2.4.4
PS.: Due to the large number of C/C, I opted to keep a smaller
set of C/C at this first e-mail (only e-mails with "L:" tag from
MAINTAINERS file).
Mauro Carvalho Chehab (35):
MAINTAINERS: dt: update display/allwinner file entry
docs: dt: fix broken reference to phy-cadence-torrent.yaml
docs: fix broken references to text files
docs: fix broken references for ReST files that moved around
docs: filesystems: fix renamed references
docs: amu: supress some Sphinx warnings
docs: arm64: booting.rst: get rid of some warnings
docs: pci: boot-interrupts.rst: improve html output
futex: get rid of a kernel-docs build warning
firewire: firewire-cdev.hL get rid of a docs warning
scripts: kernel-doc: proper handle @foo->bar()
lib: bitmap.c: get rid of some doc warnings
ata: libata-core: fix a doc warning
fs: inode.c: get rid of docs warnings
docs: ras: get rid of some warnings
docs: ras: don't need to repeat twice the same thing
docs: watch_queue.rst: supress some Sphinx warnings
scripts: kernel-doc: accept negation like !@var
docs: infiniband: verbs.c: fix some documentation warnings
docs: scripts/kernel-doc: accept blank lines on parameter description
docs: spi: spi.h: fix a doc building warning
docs: drivers: fix some warnings at base/platform.c when building docs
docs: fusion: mptbase.c: get rid of a doc build warning
docs: mm: slab.h: fix a broken cross-reference
docs mm: userfaultfd.rst: use ``foo`` for literals
docs: mm: userfaultfd.rst: use a cross-reference for a section
docs: vm: index.rst: add an orphan doc to the building system
docs: dt: qcom,dwc3.txt: fix cross-reference for a converted file
MAINTAINERS: dt: fix pointers for ARM Integrator, Versatile and
RealView
docs: dt: fix a broken reference for a file converted to json
powerpc: docs: cxl.rst: mark two section titles as such
docs: LaTeX/PDF: drop list of documents
docs: i2c: rename i2c.svg to i2c_bus.svg
docs: Makefile: place final pdf docs on a separate dir
docs: update recommended Sphinx version to 2.4.4
Documentation/ABI/stable/sysfs-devices-node | 2 +-
Documentation/ABI/testing/procfs-smaps_rollup | 2 +-
Documentation/Makefile | 6 +-
Documentation/PCI/boot-interrupts.rst | 34 +--
Documentation/admin-guide/cpu-load.rst | 2 +-
Documentation/admin-guide/mm/userfaultfd.rst | 209 +++++++++---------
Documentation/admin-guide/nfs/nfsroot.rst | 2 +-
Documentation/admin-guide/ras.rst | 18 +-
Documentation/arm64/amu.rst | 5 +
Documentation/arm64/booting.rst | 36 +--
Documentation/conf.py | 38 ----
.../bindings/net/qualcomm-bluetooth.txt | 2 +-
.../bindings/phy/ti,phy-j721e-wiz.yaml | 2 +-
.../devicetree/bindings/usb/qcom,dwc3.txt | 4 +-
.../doc-guide/maintainer-profile.rst | 2 +-
.../driver-api/driver-model/device.rst | 4 +-
.../driver-api/driver-model/overview.rst | 2 +-
Documentation/filesystems/dax.txt | 2 +-
Documentation/filesystems/dnotify.txt | 2 +-
.../filesystems/ramfs-rootfs-initramfs.rst | 2 +-
Documentation/filesystems/sysfs.rst | 2 +-
Documentation/i2c/{i2c.svg => i2c_bus.svg} | 2 +-
Documentation/i2c/summary.rst | 2 +-
Documentation/memory-barriers.txt | 2 +-
Documentation/powerpc/cxl.rst | 2 +
.../powerpc/firmware-assisted-dump.rst | 2 +-
Documentation/process/adding-syscalls.rst | 2 +-
Documentation/process/submit-checklist.rst | 2 +-
Documentation/sphinx/requirements.txt | 2 +-
.../it_IT/process/adding-syscalls.rst | 2 +-
.../it_IT/process/submit-checklist.rst | 2 +-
.../translations/ko_KR/memory-barriers.txt | 2 +-
.../translations/zh_CN/filesystems/sysfs.txt | 8 +-
.../zh_CN/process/submit-checklist.rst | 2 +-
Documentation/virt/kvm/arm/pvtime.rst | 2 +-
Documentation/virt/kvm/devices/vcpu.rst | 2 +-
Documentation/virt/kvm/hypercalls.rst | 4 +-
Documentation/virt/kvm/mmu.rst | 2 +-
Documentation/virt/kvm/review-checklist.rst | 2 +-
Documentation/vm/index.rst | 1 +
Documentation/watch_queue.rst | 34 ++-
MAINTAINERS | 7 +-
arch/powerpc/include/uapi/asm/kvm_para.h | 2 +-
arch/x86/kvm/mmu/mmu.c | 2 +-
drivers/ata/libata-core.c | 2 +-
drivers/base/core.c | 2 +-
drivers/base/platform.c | 6 +-
.../allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +-
.../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 2 +-
.../allwinner/sun8i-ss/sun8i-ss-cipher.c | 2 +-
.../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +-
drivers/gpu/drm/Kconfig | 2 +-
drivers/gpu/drm/drm_ioctl.c | 2 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 2 +-
drivers/hwtracing/coresight/Kconfig | 2 +-
drivers/infiniband/core/verbs.c | 7 +-
drivers/media/v4l2-core/v4l2-fwnode.c | 2 +-
drivers/message/fusion/mptbase.c | 8 +-
fs/Kconfig | 2 +-
fs/Kconfig.binfmt | 2 +-
fs/adfs/Kconfig | 2 +-
fs/affs/Kconfig | 2 +-
fs/afs/Kconfig | 6 +-
fs/bfs/Kconfig | 2 +-
fs/cramfs/Kconfig | 2 +-
fs/ecryptfs/Kconfig | 2 +-
fs/fat/Kconfig | 8 +-
fs/fuse/Kconfig | 2 +-
fs/fuse/dev.c | 2 +-
fs/hfs/Kconfig | 2 +-
fs/hpfs/Kconfig | 2 +-
fs/inode.c | 6 +-
fs/isofs/Kconfig | 2 +-
fs/namespace.c | 2 +-
fs/notify/inotify/Kconfig | 2 +-
fs/ntfs/Kconfig | 2 +-
fs/ocfs2/Kconfig | 2 +-
fs/overlayfs/Kconfig | 6 +-
fs/proc/Kconfig | 4 +-
fs/romfs/Kconfig | 2 +-
fs/sysfs/dir.c | 2 +-
fs/sysfs/file.c | 2 +-
fs/sysfs/mount.c | 2 +-
fs/sysfs/symlink.c | 2 +-
fs/sysv/Kconfig | 2 +-
fs/udf/Kconfig | 2 +-
include/linux/kobject.h | 2 +-
include/linux/kobject_ns.h | 2 +-
include/linux/mm.h | 4 +-
include/linux/relay.h | 2 +-
include/linux/slab.h | 2 +-
include/linux/spi/spi.h | 1 +
include/linux/sysfs.h | 2 +-
include/uapi/linux/ethtool_netlink.h | 2 +-
include/uapi/linux/firewire-cdev.h | 2 +-
include/uapi/linux/kvm.h | 4 +-
include/uapi/rdma/rdma_user_ioctl_cmds.h | 2 +-
kernel/futex.c | 3 +
kernel/relay.c | 2 +-
lib/bitmap.c | 27 +--
lib/kobject.c | 4 +-
mm/gup.c | 12 +-
scripts/kernel-doc | 41 ++--
tools/include/uapi/linux/kvm.h | 4 +-
virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 +-
virt/kvm/arm/vgic/vgic.h | 4 +-
106 files changed, 373 insertions(+), 338 deletions(-)
rename Documentation/i2c/{i2c.svg => i2c_bus.svg} (99%)
--
2.25.2
[View Less]
Since the PWM framework is switching struct pwm_state.duty_cycle's
datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL
to handle a 64-bit dividend.
Cc: Jani Nikula <jani.nikula(a)linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen(a)linux.intel.com>
Cc: David Airlie <airlied(a)linux.ie>
Cc: Daniel Vetter <daniel(a)ffwll.ch>
Cc: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: "Ville Syrjälä" <ville.syrjala(a)linux.intel.com>
Cc: intel-gfx(a)…
[View More]lists.freedesktop.org
Cc: dri-devel(a)lists.freedesktop.org
Signed-off-by: Guru Das Srinagesh <gurus(a)codeaurora.org>
Reviewed-by: Jani Nikula <jani.nikula(a)intel.com>
---
drivers/gpu/drm/i915/display/intel_panel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
index 7b3ec6eb..b45eabf 100644
--- a/drivers/gpu/drm/i915/display/intel_panel.c
+++ b/drivers/gpu/drm/i915/display/intel_panel.c
@@ -1877,7 +1877,7 @@ static int pwm_setup_backlight(struct intel_connector *connector,
panel->backlight.min = 0; /* 0% */
panel->backlight.max = 100; /* 100% */
- panel->backlight.level = DIV_ROUND_UP(
+ panel->backlight.level = DIV_ROUND_UP_ULL(
pwm_get_duty_cycle(panel->backlight.pwm) * 100,
CRC_PMIC_PWM_PERIOD_NS);
panel->backlight.enabled = panel->backlight.level != 0;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
[View Less]