Re: [PATCH RFC 24/24] drm/lima: add makefile and kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Cheers,
Andre.

> Regards,
> Qiang
> On Sat, Jun 16, 2018 at 1:23 AM Andre Przywara <andre.przywara@xxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx>
>>>>
>>>> Signed-off-by: Qiang Yu <yuq825@xxxxxxxxx>
>>>> Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
>>>> Signed-off-by: Simon Shields <simon@xxxxxxxxxxxxx>
>>>> Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
>>>> ---
>>>>  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@xxxxxxxxxxxxxxxxxxxxx
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux