All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: Qiang Yu <yuq825@gmail.com>
Cc: Simon Shields <simon@lineageos.org>, Marek Vasut <marex@denx.de>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH RFC 24/24] drm/lima: add makefile and kconfig
Date: Sat, 14 Jul 2018 20:15:17 +0100	[thread overview]
Message-ID: <4e969505-0722-c607-f3ba-bb2d37345cee@arm.com> (raw)
In-Reply-To: <CAKGbVbuqSA9fnT9FJJ97+3CU7rZJGTid-=wtrpvm9P4R_ZfZwg@mail.gmail.com>

On 07/14/2018 03:18 PM, Qiang Yu wrote:

Hi,

> On Sat, Jul 14, 2018 at 8:07 PM André Przywara <andre.przywara@arm.com> wrote:
>>
>> On 07/14/2018 02:14 AM, Qiang Yu wrote:
>>
>> Hi,
>>
>>> Thanks for your info. What a surprise that exist such a SoC. That
>>> means I have to
>>> judge if it's a 64bit CPU in other way than just check ARM64 config.
>>
>> Yeah, you should do anyways. Actually you should try to avoid those
>> explicit checks in the first place. Drivers shouldn't need to care about
>> the "bit size" of the CPU and Linux provides many ways to automatically
>> cope with that, with types likes phys_addr_t for instance.
>> Quickly grep-ing I find "need_dma32" in lima_ttm.c:lima_ttm_init(), is
>> that the only place you need to check?
> Yes, mali GPU can only use physical mem within 32bit address space.

Ah, thanks, I was wondering about that.

> So I check ARM64 and ARM_LPAE for possible more than 32bit
> address space to pass in “need_dma32”.

Mmh, but this is not how I understand this parameter. To me it looks
like it is a property of the device (GPU and bus), but not the CPU.
So if Mali 4xx can only do 32-bit DMA, then this parameter should
*always* be true, regardless of whether the CPU can address more than
4GB. If the system is restricted to 32-bit anyways, it should not hurt
to have it set to true, even though it is not needed in this case.

So you can drop this check altogether and just always pass "true".

Cheers,
Andre.

>>> On Sat, Jun 16, 2018 at 1:23 AM Andre Przywara <andre.przywara@arm.com> wrote:
>>>>
>>>> On 05/23/2018 17:16, Marek Vasut wrote:
>>>>> On 05/18/2018 11:28 AM, Qiang Yu wrote:
>>>>>> From: Lima Project Developers <dri-devel@lists.freedesktop.org>
>>>>>>
>>>>>> Signed-off-by: Qiang Yu <yuq825@gmail.com>
>>>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>>>> Signed-off-by: Simon Shields <simon@lineageos.org>
>>>>>> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>>>>>> ---
>>>>>>  drivers/gpu/drm/Kconfig       |  2 ++
>>>>>>  drivers/gpu/drm/Makefile      |  1 +
>>>>>>  drivers/gpu/drm/lima/Kconfig  |  9 +++++++++
>>>>>>  drivers/gpu/drm/lima/Makefile | 19 +++++++++++++++++++
>>>>>>  4 files changed, 31 insertions(+)
>>>>>>  create mode 100644 drivers/gpu/drm/lima/Kconfig
>>>>>>  create mode 100644 drivers/gpu/drm/lima/Makefile
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>>>>>> index deeefa7a1773..f00d529ee034 100644
>>>>>> --- a/drivers/gpu/drm/Kconfig
>>>>>> +++ b/drivers/gpu/drm/Kconfig
>>>>>> @@ -289,6 +289,8 @@ source "drivers/gpu/drm/pl111/Kconfig"
>>>>>>
>>>>>>  source "drivers/gpu/drm/tve200/Kconfig"
>>>>>>
>>>>>> +source "drivers/gpu/drm/lima/Kconfig"
>>>>>> +
>>>>>>  # Keep legacy drivers last
>>>>>>
>>>>>>  menuconfig DRM_LEGACY
>>>>>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>>>>>> index 50093ff4479b..aba686e41d6b 100644
>>>>>> --- a/drivers/gpu/drm/Makefile
>>>>>> +++ b/drivers/gpu/drm/Makefile
>>>>>> @@ -103,3 +103,4 @@ obj-$(CONFIG_DRM_MXSFB)  += mxsfb/
>>>>>>  obj-$(CONFIG_DRM_TINYDRM) += tinydrm/
>>>>>>  obj-$(CONFIG_DRM_PL111) += pl111/
>>>>>>  obj-$(CONFIG_DRM_TVE200) += tve200/
>>>>>> +obj-$(CONFIG_DRM_LIMA)  += lima/
>>>>>> diff --git a/drivers/gpu/drm/lima/Kconfig b/drivers/gpu/drm/lima/Kconfig
>>>>>> new file mode 100644
>>>>>> index 000000000000..4ce9ac2e8204
>>>>>> --- /dev/null
>>>>>> +++ b/drivers/gpu/drm/lima/Kconfig
>>>>>> @@ -0,0 +1,9 @@
>>>>>> +
>>>>>> +config DRM_LIMA
>>>>>> +       tristate "LIMA (DRM support for ARM Mali 400/450 GPU)"
>>>>>> +       depends on DRM
>>>>>> +       depends on ARCH_SUNXI || ARCH_ROCKCHIP || ARCH_EXYNOS || ARCH_MESON
>>>>>
>>>>> You can add ARCH_ZYNQMP here too , it has Mali 400 MP2.
>>>>
>>>> Well, as Qiang Yu already figured, it seems much smarter to not enumerate
>>>> every possible platform here.
>>>> More than that, the Kconfig depends should be strictly technical. There is
>>>> nothing in this driver which is ARM specific, in fact I managed to compile
>>>> it for x86-64 as well (with some small fix in a random header file).
>>>> In fact there are x86-64 based SoCs pairing Intel Atom cores with a Mali GPUs:
>>>> https://en.wikipedia.org/wiki/Rockchip#Tablet_processors_with_integrated_modem
>>>>
>>>> So you can get rid of this whole line at all, meaning you don't even need
>>>> the "depends on ARM || ARM64 || COMPILE_TEST" you have in your gitlab repo.
>>>>
>>>> Cheers,
>>>> Andre.
>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Marek Vasut
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-07-14 19:16 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18  9:27 [PATCH RFC 00/24] Lima DRM driver Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 01/24] ARM: dts: add gpu node to exynos4 Qiang Yu
2018-05-23 17:06   ` Rob Herring
2018-05-18  9:27 ` [PATCH RFC 02/24] dt-bindings: add switch-delay property for mali-utgard Qiang Yu
2018-05-23 17:04   ` Rob Herring
2018-05-24  1:52     ` Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 03/24] arm64/dts: add switch-delay for meson mali Qiang Yu
2018-05-21 14:16   ` Neil Armstrong
2018-05-21 14:16     ` Neil Armstrong
2018-05-22  0:48     ` Qiang Yu
2018-05-22  0:48       ` Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 04/24] " Qiang Yu
2018-05-21 14:16   ` Neil Armstrong
2018-05-21 14:16     ` Neil Armstrong
2018-05-18  9:27 ` [PATCH RFC 05/24] Revert "drm: Nerf the preclose callback for modern drivers" Qiang Yu
2018-05-23  9:35   ` Christian König
2018-05-23 13:13     ` Qiang Yu
2018-05-23 13:41       ` Christian König
2018-05-24  1:38         ` Qiang Yu
2018-05-24  6:46           ` Christian König
2018-05-24  9:24             ` Qiang Yu
2018-05-24  9:41               ` Christian König
2018-05-24 12:54                 ` Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 06/24] drm/lima: add lima uapi header Qiang Yu
2018-05-18  9:33   ` Marek Vasut
2018-05-20  7:22     ` Qiang Yu
2018-05-20  9:52       ` Marek Vasut
2018-05-20  7:25     ` Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 07/24] drm/lima: add mali 4xx GPU hardware regs Qiang Yu
2018-05-23 17:24   ` Rob Herring
2018-05-23 17:31     ` Vasily Khoruzhick
2018-05-24  0:58     ` Qiang Yu
2018-05-24 14:31       ` Rob Herring
2018-05-18  9:27 ` [PATCH RFC 08/24] drm/lima: add lima core driver Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 09/24] drm/lima: add GPU device functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 10/24] drm/lima: add PMU related functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 11/24] drm/lima: add L2 cache functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 12/24] drm/lima: add GP related functions Qiang Yu
2018-05-23 17:12   ` Marek Vasut
2018-05-24  0:38     ` Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 13/24] drm/lima: add PP " Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 14/24] drm/lima: add MMU " Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 15/24] drm/lima: add BCAST related function Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 16/24] drm/lima: add DLBU related functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 17/24] drm/lima: add GPU virtual memory space handing Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 18/24] drm/lima: add TTM subsystem functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 19/24] drm/lima: add buffer object functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 20/24] drm/lima: add GEM related functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 21/24] drm/lima: add GEM Prime " Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 22/24] drm/lima: add GPU schedule using DRM_SCHED Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 23/24] drm/lima: add context related functions Qiang Yu
2018-05-18  9:28 ` [PATCH RFC 24/24] drm/lima: add makefile and kconfig Qiang Yu
2018-05-23 17:16   ` Marek Vasut
2018-05-23 17:26     ` Rob Herring
2018-05-24  0:49       ` Qiang Yu
2018-06-15 17:23     ` Andre Przywara
2018-07-14  1:14       ` Qiang Yu
2018-07-14 12:06         ` André Przywara
2018-07-14 14:18           ` Qiang Yu
2018-07-14 19:15             ` André Przywara [this message]
2018-07-15  2:23               ` Qiang Yu
2018-05-23  9:02 ` [PATCH RFC 00/24] Lima DRM driver Daniel Vetter
2018-05-23 13:24   ` Qiang Yu
2018-05-23  9:29 ` Christian König
2018-05-23 13:52   ` Qiang Yu
2018-05-23 13:59     ` Christian König
2018-05-23 14:13       ` Qiang Yu
2018-05-23 14:19         ` Christian König
2018-05-23 14:27           ` Qiang Yu
2018-05-23 15:44     ` Daniel Vetter
2018-05-24  0:31       ` Qiang Yu
2018-05-24  6:27         ` Christian König
2018-05-24  7:25           ` Daniel Vetter
2018-05-24  9:53             ` Christian König
2018-05-19  6:52 Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 24/24] drm/lima: add makefile and kconfig Qiang Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e969505-0722-c607-f3ba-bb2d37345cee@arm.com \
    --to=andre.przywara@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=marex@denx.de \
    --cc=narmstrong@baylibre.com \
    --cc=simon@lineageos.org \
    --cc=yuq825@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.