Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1627201
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers |
| Date | 2017-04-20 10:40 +0200 |
| Message-ID | <tyfN8-6Do-1@gated-at.bofh.it> (permalink) |
| References | <twRa9-3u1-1@gated-at.bofh.it> <twRjQ-3xr-23@gated-at.bofh.it> <txxj4-4lo-37@gated-at.bofh.it> <txyRQ-57S-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Tue, Apr 18, 2017 at 06:47:56PM +0800, Icenowy Zheng wrote:
> >> + /* Get the physical address of the buffer in memory */
> >> + gem = drm_fb_cma_get_gem_obj(fb, 0);
> >> +
> >> + DRM_DEBUG_DRIVER("Using GEM @ %pad\n", &gem->paddr);
> >> +
> >> + /* Compute the start of the displayed memory */
> >> + bpp = fb->format->cpp[0];
> >> + paddr = gem->paddr + fb->offsets[0];
> >> + paddr += (state->src_x >> 16) * bpp;
> >> + paddr += (state->src_y >> 16) * fb->pitches[0];
> >> +
> >> + DRM_DEBUG_DRIVER("Setting buffer address to %pad\n", &paddr);
> >> +
> >> + paddr_u32 = (uint32_t) paddr;
> >
> >How does that work on 64-bits systems ?
>
> The hardware is not designed to work on 64-bit systems.
>
> Even 64-bit A64/H5 has also 3GiB memory limit.
That's a fragile assumption.
> The address cell in mixer hardware is also only 32-bit.
>
> So we should just keep the force conversion here. If we then really
> met 4GiB-capable AW SoC without changing DE2, I think we should have
> other way to limit CMA pool inside 4GiB.
The register name looks like this is only the lower 32 bits that you
can set here, and that there is another register for the upper 32 bits
of that address somewhere.
In that case, please use the lower_32_bits and upper_32_bits helper,
and don't cast it that way.
If it isn't the case, you should set the DMA mask (through
dma_set_mask) so that we only allocate memory that can be accessed by
this device.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 00/11] Initial Allwinner Display Engine 2.0 Support Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:10 +0200
[PATCH v4 09/11] ARM: dts: sun8i: add DE2 nodes for V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 01/11] dt-bindings: add binding for the Allwinner DE2 CCU Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
Re: [PATCH v4 01/11] dt-bindings: add binding for the Allwinner DE2 CCU Rob Herring <robh@kernel.org> - 2017-04-20 16:00 +0200
[PATCH v4 10/11] ARM: dts: sun8i: add pinmux for LCD pins of V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 08/11] drm/sun4i: tcon: add support for V3s TCON Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 07/11] drm/sun4i: Add compatible string for V3s display engine Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 11/11] [DO NOT MERGE] ARM: dts: sun8i: enable LCD panel of Lichee Pi Zero Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 04/11] drm/sun4i: return only planes for layers created Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
[PATCH v4 05/11] drm/sun4i: abstract a engine type Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
Re: [PATCH v4 05/11] drm/sun4i: abstract a engine type Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-18 11:00 +0200
Re: [PATCH v4 05/11] drm/sun4i: abstract a engine type Icenowy Zheng <icenowy@aosc.io> - 2017-04-18 13:10 +0200
Re: [PATCH v4 05/11] drm/sun4i: abstract a engine type Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-20 16:50 +0200
[PATCH v4 02/11] clk: sunxi-ng: add support for DE2 CCU Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
Re: [PATCH v4 02/11] clk: sunxi-ng: add support for DE2 CCU Rob Herring <robh@kernel.org> - 2017-04-20 16:10 +0200
Re: [PATCH v4 02/11] clk: sunxi-ng: add support for DE2 CCU Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-20 16:40 +0200
Re: [PATCH v4 02/11] clk: sunxi-ng: add support for DE2 CCU Rob Herring <robh@kernel.org> - 2017-04-21 00:40 +0200
[PATCH v4 03/11] dt-bindings: add bindings for DE2 on V3s SoC Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
Re: [PATCH v4 03/11] dt-bindings: add bindings for DE2 on V3s SoC Rob Herring <robh@kernel.org> - 2017-04-20 16:10 +0200
[PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-04-16 14:20 +0200
Re: [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-18 11:10 +0200
Re: [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng <icenowy@aosc.io> - 2017-04-18 12:50 +0200
Re: [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-20 10:40 +0200
Re: [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers icenowy@aosc.io - 2017-04-21 10:20 +0200
csiph-web