Re: [PATCH v3 1/9] drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver

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

 



On 14 October 2016 at 22:33, Benjamin Gaignard
<benjamin.gaignard@xxxxxxxxxx> wrote:
> Just by curiosity, why using "old" TTM instead of GEM ? any particular reasons ?

>From the linux kernel DRM mm doc[1] it says:
"GEM has simpler initialization and execution requirements than
 25 TTM, but has no video RAM management capabilities and is thus
limited to
 26 UMA devices."

So, I think we can't use GEM to managing video RAM.
But in fact, in this driver fb buffer is also created as an GEM object
though it use TTM to manage video RAM.
So GEM ,like its name, say mostly use for execution management ???

[1] Documentation/gpu/drm-mm.rst

-xinliang

>
> 2016-10-14 16:44 GMT+02:00 Rongrong Zou <zourongrong@xxxxxxxxx>:
>> Hi Benjamin,
>>
>> Thanks for reviewing!
>>
>> Benjamin Gaignard 於 2016/10/14 16:29 寫道:
>>>
>>> [snip]
>>>
>>>> --- /dev/null
>>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/Kconfig
>>>> @@ -0,0 +1,15 @@
>>>> +config DRM_HISI_HIBMC
>>>> +       tristate "DRM Support for Hisilicon Hibmc"
>>>> +       depends on DRM && PCI
>>>> +       select DRM_KMS_HELPER
>>>> +       select DRM_KMS_FB_HELPER
>>>> +       select DRM_GEM_CMA_HELPER
>>>> +       select DRM_KMS_CMA_HELPER
>>>
>>>
>>> since you use TTM I don't think that selecting DRM_GEM_CMA_HELPER and
>>> DRM_KMS_CMA_HELPER
>>> help you lot here.
>>> You could add configuration flags step by step in following patches
>>> that will make you needs more clear (that also true for #include)
>>
>>
>> will delete them, thanks.
>>
>>
>>>
>>>> +       select FB_SYS_FILLRECT
>>>> +       select FB_SYS_COPYAREA
>>>> +       select FB_SYS_IMAGEBLIT
>>>> +       select DRM_TTM
>>>> +
>>>> +       help
>>>> +         Choose this option if you have a Hisilicon Hibmc soc chipset.
>>>> +         If M is selected the module will be called hibmc-drm.
>>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/Makefile
>>>> b/drivers/gpu/drm/hisilicon/hibmc/Makefile
>>>> new file mode 100644
>>>> index 0000000..97cf4a0
>>>> --- /dev/null
>>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/Makefile
>>>> @@ -0,0 +1,5 @@
>>>> +ccflags-y := -Iinclude/drm
>>>> +hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_power.o
>>>> +
>>>> +obj-$(CONFIG_DRM_HISI_HIBMC)   +=hibmc-drm.o
>>>> +#obj-y += hibmc-drm.o
>>>> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>>> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>>> new file mode 100644
>>>> index 0000000..52c9353
>>>> --- /dev/null
>>>> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
>>>> @@ -0,0 +1,288 @@
>>>> +/* Hisilicon Hibmc SoC drm driver
>>>> + *
>>>> + * Based on the bochs drm driver.
>>>> + *
>>>> + * Copyright (c) 2016 Huawei Limited.
>>>> + *
>>>> + * Author:
>>>> + *     Rongrong Zou <zourongrong@huawei>
>>>
>>>
>>> ".com" is missing in you email address (same typo in all other files)
>>
>>
>> will fix it in next version, thanks. :)
>>
>>>
>>>> + *     Rongrong Zou <zourongrong@xxxxxxxxx>
>>>> + *     Jianhua Li <lijianhua@xxxxxxxxxx>
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or modify
>>>> + * it under the terms of the GNU General Public License as published by
>>>> + * the Free Software Foundation; either version 2 of the License, or
>>>> + * (at your option) any later version.
>>>> + *
>>>> + */
>>>> +
>>>> +#include <linux/module.h>
>>>> +#include <linux/console.h>
>>>> +#include <drm/drm_atomic_helper.h>
>>>> +#include <drm/drm_crtc_helper.h>
>>>> +#include <drm/drm_fb_helper.h>
>>>> +#include <drm/drm_fb_cma_helper.h>
>>>> +#include <drm/drm_gem_cma_helper.h>
>>>
>>>
>>> cma_helpers look useless since you use TTM, no ?
>>
>>
>> I add TTM just in this version, and forgot to clean these
>> cma relevant code, will fix in next version. Thanks.
>>
>>>
>>>> +#include <drm/drmP.h>
>>>> +
>>>> +#include "hibmc_drm_drv.h"
>>>> +#include "hibmc_drm_regs.h"
>>>> +#include "hibmc_drm_power.h"
>>>> +
>>
>>
>> Regards,
>> Rongrong
>
>
>
> --
> Benjamin Gaignard
>
> Graphic Study Group
>
> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
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