All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm
@ 2016-08-17 10:17 Daniel Vetter
  2016-08-17 10:17 ` [PATCH 2/2] drm/hisilicon: Make it compile again Daniel Vetter
  2016-08-17 13:58 ` [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Stone
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Vetter @ 2016-08-17 10:17 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Xinliang Liu, Chen Feng, Daniel Vetter

I just broke the build :(

Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Sean Paul <seanpaul@chromium.org>
Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 Documentation/gpu/drm-kms.rst           | 9 +++++++++
 drivers/gpu/drm/hisilicon/kirin/Kconfig | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
index d5ad60d3cf06..6544c74d250a 100644
--- a/Documentation/gpu/drm-kms.rst
+++ b/Documentation/gpu/drm-kms.rst
@@ -389,6 +389,15 @@ connector and plane objects by calling the
 pointer to the target object, a pointer to the previously created
 property and an initial instance value.
 
+Property Types and Blob Property Support
+----------------------------------------
+
+.. kernel-doc:: include/drm/drm_property.h
+   :internal:
+
+.. kernel-doc:: drivers/gpu/drm/drm_property.c
+   :export:
+
 Blending and Z-Position properties
 ----------------------------------
 
diff --git a/drivers/gpu/drm/hisilicon/kirin/Kconfig b/drivers/gpu/drm/hisilicon/kirin/Kconfig
index 499f64405dac..1524adcb5429 100644
--- a/drivers/gpu/drm/hisilicon/kirin/Kconfig
+++ b/drivers/gpu/drm/hisilicon/kirin/Kconfig
@@ -1,6 +1,7 @@
 config DRM_HISI_KIRIN
 	tristate "DRM Support for Hisilicon Kirin series SoCs Platform"
-	depends on DRM && OF && ARM64
+	depends on DRM && OF
+	depends on ARM64 || (ARM && COMPILE_TEST)
 	select DRM_KMS_HELPER
 	select DRM_GEM_CMA_HELPER
 	select DRM_KMS_CMA_HELPER
-- 
2.8.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-17 10:17 [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Vetter
@ 2016-08-17 10:17 ` Daniel Vetter
  2016-08-17 11:02   ` Xinliang Liu
  2016-08-17 13:58 ` [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Stone
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2016-08-17 10:17 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Xinliang Liu, Chen Feng, Daniel Vetter

I just broke the build :(

Note that the cleanup function is a bit confused: ade_data was never
set as drvdata, and calling drm_crtc_cleanup directly is a bug - this
is called indirectly through drm_mode_config_cleanup, which calls into
crtc->destroy, which already has the call to drm_crtc_cleanup. Which
means we can just nuke it.

Aside: I have no idea why this driver depends upon ARM64. It doesn't
build warning-free on 32bit, but otherwise it's perfectly fine.

Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: Sean Paul <seanpaul@chromium.org>
Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
index 91188f33b1d9..c64c82cb7e71 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
 
 static int ade_drm_init(struct platform_device *pdev)
 {
-	struct drm_device *drm_dev = platform_get_drvdata(dev);
+	struct drm_device *dev = platform_get_drvdata(pdev);
 	struct ade_data *ade;
 	struct ade_hw_ctx *ctx;
 	struct ade_crtc *acrtc;
@@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
 
 static void ade_drm_cleanup(struct platform_device *pdev)
 {
-	struct drm_device *drm_dev = platform_get_drvdata(dev);
-	struct ade_data *ade = platform_get_drvdata(pdev);
-	struct drm_crtc *crtc = &ade->acrtc.base;
-
-	drm_crtc_cleanup(crtc);
 }
 
 const struct kirin_dc_ops ade_dc_ops = {
 	.init = ade_drm_init,
 	.cleanup = ade_drm_cleanup
-;
+};
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
index 6b0f9f6c16e1..b9b8c25da5e3 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
@@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
 	kirin_drm_mode_config_init(dev);
 
 	/* display controller init */
-	ret = dc_ops->init(to_platform_device(dev));
+	ret = dc_ops->init(to_platform_device(dev->dev));
 	if (ret)
 		goto err_mode_config_cleanup;
 
@@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
 err_unbind_all:
 	component_unbind_all(dev->dev, dev);
 err_dc_cleanup:
-	dc_ops->cleanup(dev);
+	dc_ops->cleanup(to_platform_device(dev->dev));
 err_mode_config_cleanup:
 	drm_mode_config_cleanup(dev);
 	devm_kfree(dev->dev, priv);
-- 
2.8.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-17 10:17 ` [PATCH 2/2] drm/hisilicon: Make it compile again Daniel Vetter
@ 2016-08-17 11:02   ` Xinliang Liu
  2016-08-17 11:11     ` Daniel Vetter
  0 siblings, 1 reply; 8+ messages in thread
From: Xinliang Liu @ 2016-08-17 11:02 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Xinliang Liu, Chen Feng, DRI Development, Daniel Vetter

Hi,

On 17 August 2016 at 18:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> I just broke the build :(
>
> Note that the cleanup function is a bit confused: ade_data was never
> set as drvdata, and calling drm_crtc_cleanup directly is a bug - this

Yes, this is a bug. Thanks for pointing out this.

> is called indirectly through drm_mode_config_cleanup, which calls into
> crtc->destroy, which already has the call to drm_crtc_cleanup. Which
> means we can just nuke it.
>
> Aside: I have no idea why this driver depends upon ARM64. It doesn't
> build warning-free on 32bit, but otherwise it's perfectly fine.

Because this driver is written for ARM64 SoCs.

Thanks,
-xinliang

>
> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
>  2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> index 91188f33b1d9..c64c82cb7e71 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
>
>  static int ade_drm_init(struct platform_device *pdev)
>  {
> -       struct drm_device *drm_dev = platform_get_drvdata(dev);
> +       struct drm_device *dev = platform_get_drvdata(pdev);
>         struct ade_data *ade;
>         struct ade_hw_ctx *ctx;
>         struct ade_crtc *acrtc;
> @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
>
>  static void ade_drm_cleanup(struct platform_device *pdev)
>  {
> -       struct drm_device *drm_dev = platform_get_drvdata(dev);
> -       struct ade_data *ade = platform_get_drvdata(pdev);
> -       struct drm_crtc *crtc = &ade->acrtc.base;
> -
> -       drm_crtc_cleanup(crtc);
>  }
>
>  const struct kirin_dc_ops ade_dc_ops = {
>         .init = ade_drm_init,
>         .cleanup = ade_drm_cleanup
> -;
> +};
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> index 6b0f9f6c16e1..b9b8c25da5e3 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>         kirin_drm_mode_config_init(dev);
>
>         /* display controller init */
> -       ret = dc_ops->init(to_platform_device(dev));
> +       ret = dc_ops->init(to_platform_device(dev->dev));
>         if (ret)
>                 goto err_mode_config_cleanup;
>
> @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>  err_unbind_all:
>         component_unbind_all(dev->dev, dev);
>  err_dc_cleanup:
> -       dc_ops->cleanup(dev);
> +       dc_ops->cleanup(to_platform_device(dev->dev));
>  err_mode_config_cleanup:
>         drm_mode_config_cleanup(dev);
>         devm_kfree(dev->dev, priv);
> --
> 2.8.1
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-17 11:02   ` Xinliang Liu
@ 2016-08-17 11:11     ` Daniel Vetter
  2016-08-26  1:48       ` Xinliang Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2016-08-17 11:11 UTC (permalink / raw)
  To: Xinliang Liu
  Cc: Xinliang Liu, Daniel Vetter, Daniel Vetter, DRI Development, Chen Feng

On Wed, Aug 17, 2016 at 07:02:01PM +0800, Xinliang Liu wrote:
> Hi,
> 
> On 17 August 2016 at 18:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > I just broke the build :(
> >
> > Note that the cleanup function is a bit confused: ade_data was never
> > set as drvdata, and calling drm_crtc_cleanup directly is a bug - this
> 
> Yes, this is a bug. Thanks for pointing out this.
> 
> > is called indirectly through drm_mode_config_cleanup, which calls into
> > crtc->destroy, which already has the call to drm_crtc_cleanup. Which
> > means we can just nuke it.
> >
> > Aside: I have no idea why this driver depends upon ARM64. It doesn't
> > build warning-free on 32bit, but otherwise it's perfectly fine.
> 
> Because this driver is written for ARM64 SoCs.

It makes compile-testing harder, the same reasons why depending upon
specific arm platforms is really annoying (but lukily that problem seems
to have stopped being one for the drm subsystem at least). Depending on
CONFIG_OF and other stuff that's really needed is perfectly fine, but imo
depending upon specific platforms and stuff really isn't.
-Daniel

> 
> Thanks,
> -xinliang
> 
> >
> > Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
> > Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> > Cc: Chen Feng <puck.chen@hisilicon.com>
> > Cc: Sean Paul <seanpaul@chromium.org>
> > Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
> >  2 files changed, 4 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > index 91188f33b1d9..c64c82cb7e71 100644
> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
> > @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
> >
> >  static int ade_drm_init(struct platform_device *pdev)
> >  {
> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
> > +       struct drm_device *dev = platform_get_drvdata(pdev);
> >         struct ade_data *ade;
> >         struct ade_hw_ctx *ctx;
> >         struct ade_crtc *acrtc;
> > @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
> >
> >  static void ade_drm_cleanup(struct platform_device *pdev)
> >  {
> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
> > -       struct ade_data *ade = platform_get_drvdata(pdev);
> > -       struct drm_crtc *crtc = &ade->acrtc.base;
> > -
> > -       drm_crtc_cleanup(crtc);
> >  }
> >
> >  const struct kirin_dc_ops ade_dc_ops = {
> >         .init = ade_drm_init,
> >         .cleanup = ade_drm_cleanup
> > -;
> > +};
> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> > index 6b0f9f6c16e1..b9b8c25da5e3 100644
> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> > @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
> >         kirin_drm_mode_config_init(dev);
> >
> >         /* display controller init */
> > -       ret = dc_ops->init(to_platform_device(dev));
> > +       ret = dc_ops->init(to_platform_device(dev->dev));
> >         if (ret)
> >                 goto err_mode_config_cleanup;
> >
> > @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
> >  err_unbind_all:
> >         component_unbind_all(dev->dev, dev);
> >  err_dc_cleanup:
> > -       dc_ops->cleanup(dev);
> > +       dc_ops->cleanup(to_platform_device(dev->dev));
> >  err_mode_config_cleanup:
> >         drm_mode_config_cleanup(dev);
> >         devm_kfree(dev->dev, priv);
> > --
> > 2.8.1
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm
  2016-08-17 10:17 [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Vetter
  2016-08-17 10:17 ` [PATCH 2/2] drm/hisilicon: Make it compile again Daniel Vetter
@ 2016-08-17 13:58 ` Daniel Stone
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Stone @ 2016-08-17 13:58 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Xinliang Liu, Chen Feng, DRI Development, Daniel Vetter

On 17 August 2016 at 11:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> index d5ad60d3cf06..6544c74d250a 100644
> --- a/Documentation/gpu/drm-kms.rst
> +++ b/Documentation/gpu/drm-kms.rst
> @@ -389,6 +389,15 @@ connector and plane objects by calling the
>  pointer to the target object, a pointer to the previously created
>  property and an initial instance value.
>
> +Property Types and Blob Property Support
> +----------------------------------------
> +
> +.. kernel-doc:: include/drm/drm_property.h
> +   :internal:
> +
> +.. kernel-doc:: drivers/gpu/drm/drm_property.c
> +   :export:
> +
>  Blending and Z-Position properties
>  ----------------------------------

Oops. :(

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-17 11:11     ` Daniel Vetter
@ 2016-08-26  1:48       ` Xinliang Liu
  2016-08-26  2:28         ` Rob Clark
  0 siblings, 1 reply; 8+ messages in thread
From: Xinliang Liu @ 2016-08-26  1:48 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Xinliang Liu, Daniel Vetter, Daniel Vetter, DRI Development, Chen Feng

On 17 August 2016 at 19:11, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Aug 17, 2016 at 07:02:01PM +0800, Xinliang Liu wrote:
>> Hi,
>>
>> On 17 August 2016 at 18:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> > I just broke the build :(
>> >
>> > Note that the cleanup function is a bit confused: ade_data was never
>> > set as drvdata, and calling drm_crtc_cleanup directly is a bug - this
>>
>> Yes, this is a bug. Thanks for pointing out this.
>>
>> > is called indirectly through drm_mode_config_cleanup, which calls into
>> > crtc->destroy, which already has the call to drm_crtc_cleanup. Which
>> > means we can just nuke it.
>> >
>> > Aside: I have no idea why this driver depends upon ARM64. It doesn't
>> > build warning-free on 32bit, but otherwise it's perfectly fine.
>>
>> Because this driver is written for ARM64 SoCs.
>
> It makes compile-testing harder, the same reasons why depending upon

What compile-testing we will have? I just try to understand the problem.

Thanks,
-xinliang

> specific arm platforms is really annoying (but lukily that problem seems
> to have stopped being one for the drm subsystem at least). Depending on
> CONFIG_OF and other stuff that's really needed is perfectly fine, but imo
> depending upon specific platforms and stuff really isn't.
> -Daniel
>
>>
>> Thanks,
>> -xinliang
>>
>> >
>> > Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
>> > Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
>> > Cc: Chen Feng <puck.chen@hisilicon.com>
>> > Cc: Sean Paul <seanpaul@chromium.org>
>> > Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
>> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> > ---
>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
>> >  2 files changed, 4 insertions(+), 9 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>> > index 91188f33b1d9..c64c82cb7e71 100644
>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>> > @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
>> >
>> >  static int ade_drm_init(struct platform_device *pdev)
>> >  {
>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>> > +       struct drm_device *dev = platform_get_drvdata(pdev);
>> >         struct ade_data *ade;
>> >         struct ade_hw_ctx *ctx;
>> >         struct ade_crtc *acrtc;
>> > @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
>> >
>> >  static void ade_drm_cleanup(struct platform_device *pdev)
>> >  {
>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>> > -       struct ade_data *ade = platform_get_drvdata(pdev);
>> > -       struct drm_crtc *crtc = &ade->acrtc.base;
>> > -
>> > -       drm_crtc_cleanup(crtc);
>> >  }
>> >
>> >  const struct kirin_dc_ops ade_dc_ops = {
>> >         .init = ade_drm_init,
>> >         .cleanup = ade_drm_cleanup
>> > -;
>> > +};
>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>> > index 6b0f9f6c16e1..b9b8c25da5e3 100644
>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>> > @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>> >         kirin_drm_mode_config_init(dev);
>> >
>> >         /* display controller init */
>> > -       ret = dc_ops->init(to_platform_device(dev));
>> > +       ret = dc_ops->init(to_platform_device(dev->dev));
>> >         if (ret)
>> >                 goto err_mode_config_cleanup;
>> >
>> > @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>> >  err_unbind_all:
>> >         component_unbind_all(dev->dev, dev);
>> >  err_dc_cleanup:
>> > -       dc_ops->cleanup(dev);
>> > +       dc_ops->cleanup(to_platform_device(dev->dev));
>> >  err_mode_config_cleanup:
>> >         drm_mode_config_cleanup(dev);
>> >         devm_kfree(dev->dev, priv);
>> > --
>> > 2.8.1
>> >
>> > _______________________________________________
>> > dri-devel mailing list
>> > dri-devel@lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-26  1:48       ` Xinliang Liu
@ 2016-08-26  2:28         ` Rob Clark
  2016-09-01  3:33           ` Xinliang Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Clark @ 2016-08-26  2:28 UTC (permalink / raw)
  To: Xinliang Liu
  Cc: Daniel Vetter, DRI Development, Xinliang Liu, Chen Feng, Daniel Vetter

On Thu, Aug 25, 2016 at 9:48 PM, Xinliang Liu <xinliang.liu@linaro.org> wrote:
> On 17 August 2016 at 19:11, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Wed, Aug 17, 2016 at 07:02:01PM +0800, Xinliang Liu wrote:
>>> Hi,
>>>
>>> On 17 August 2016 at 18:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>>> > I just broke the build :(
>>> >
>>> > Note that the cleanup function is a bit confused: ade_data was never
>>> > set as drvdata, and calling drm_crtc_cleanup directly is a bug - this
>>>
>>> Yes, this is a bug. Thanks for pointing out this.
>>>
>>> > is called indirectly through drm_mode_config_cleanup, which calls into
>>> > crtc->destroy, which already has the call to drm_crtc_cleanup. Which
>>> > means we can just nuke it.
>>> >
>>> > Aside: I have no idea why this driver depends upon ARM64. It doesn't
>>> > build warning-free on 32bit, but otherwise it's perfectly fine.
>>>
>>> Because this driver is written for ARM64 SoCs.
>>
>> It makes compile-testing harder, the same reasons why depending upon
>
> What compile-testing we will have? I just try to understand the problem.

it is useful for others who don't have the hw to be able to compile
test core changes (hence kconfig COMPILE_TEST option) to at least
catch the sorts of problems that compilers can catch..

BR,
-R


> Thanks,
> -xinliang
>
>> specific arm platforms is really annoying (but lukily that problem seems
>> to have stopped being one for the drm subsystem at least). Depending on
>> CONFIG_OF and other stuff that's really needed is perfectly fine, but imo
>> depending upon specific platforms and stuff really isn't.
>> -Daniel
>>
>>>
>>> Thanks,
>>> -xinliang
>>>
>>> >
>>> > Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
>>> > Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
>>> > Cc: Chen Feng <puck.chen@hisilicon.com>
>>> > Cc: Sean Paul <seanpaul@chromium.org>
>>> > Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
>>> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>> > ---
>>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
>>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
>>> >  2 files changed, 4 insertions(+), 9 deletions(-)
>>> >
>>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>> > index 91188f33b1d9..c64c82cb7e71 100644
>>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>> > @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
>>> >
>>> >  static int ade_drm_init(struct platform_device *pdev)
>>> >  {
>>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>>> > +       struct drm_device *dev = platform_get_drvdata(pdev);
>>> >         struct ade_data *ade;
>>> >         struct ade_hw_ctx *ctx;
>>> >         struct ade_crtc *acrtc;
>>> > @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
>>> >
>>> >  static void ade_drm_cleanup(struct platform_device *pdev)
>>> >  {
>>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>>> > -       struct ade_data *ade = platform_get_drvdata(pdev);
>>> > -       struct drm_crtc *crtc = &ade->acrtc.base;
>>> > -
>>> > -       drm_crtc_cleanup(crtc);
>>> >  }
>>> >
>>> >  const struct kirin_dc_ops ade_dc_ops = {
>>> >         .init = ade_drm_init,
>>> >         .cleanup = ade_drm_cleanup
>>> > -;
>>> > +};
>>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>> > index 6b0f9f6c16e1..b9b8c25da5e3 100644
>>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>> > @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>>> >         kirin_drm_mode_config_init(dev);
>>> >
>>> >         /* display controller init */
>>> > -       ret = dc_ops->init(to_platform_device(dev));
>>> > +       ret = dc_ops->init(to_platform_device(dev->dev));
>>> >         if (ret)
>>> >                 goto err_mode_config_cleanup;
>>> >
>>> > @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>>> >  err_unbind_all:
>>> >         component_unbind_all(dev->dev, dev);
>>> >  err_dc_cleanup:
>>> > -       dc_ops->cleanup(dev);
>>> > +       dc_ops->cleanup(to_platform_device(dev->dev));
>>> >  err_mode_config_cleanup:
>>> >         drm_mode_config_cleanup(dev);
>>> >         devm_kfree(dev->dev, priv);
>>> > --
>>> > 2.8.1
>>> >
>>> > _______________________________________________
>>> > dri-devel mailing list
>>> > dri-devel@lists.freedesktop.org
>>> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>> --
>> Daniel Vetter
>> Software Engineer, Intel Corporation
>> http://blog.ffwll.ch
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] drm/hisilicon: Make it compile again
  2016-08-26  2:28         ` Rob Clark
@ 2016-09-01  3:33           ` Xinliang Liu
  0 siblings, 0 replies; 8+ messages in thread
From: Xinliang Liu @ 2016-09-01  3:33 UTC (permalink / raw)
  To: Rob Clark
  Cc: Daniel Vetter, DRI Development, Xinliang Liu, Chen Feng, Daniel Vetter

Hi,

On 26 August 2016 at 10:28, Rob Clark <robdclark@gmail.com> wrote:
> On Thu, Aug 25, 2016 at 9:48 PM, Xinliang Liu <xinliang.liu@linaro.org> wrote:
>> On 17 August 2016 at 19:11, Daniel Vetter <daniel@ffwll.ch> wrote:
>>> On Wed, Aug 17, 2016 at 07:02:01PM +0800, Xinliang Liu wrote:
>>>> Hi,
>>>>
>>>> On 17 August 2016 at 18:17, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>>>> > I just broke the build :(
>>>> >
>>>> > Note that the cleanup function is a bit confused: ade_data was never
>>>> > set as drvdata, and calling drm_crtc_cleanup directly is a bug - this
>>>>
>>>> Yes, this is a bug. Thanks for pointing out this.
>>>>
>>>> > is called indirectly through drm_mode_config_cleanup, which calls into
>>>> > crtc->destroy, which already has the call to drm_crtc_cleanup. Which
>>>> > means we can just nuke it.
>>>> >
>>>> > Aside: I have no idea why this driver depends upon ARM64. It doesn't
>>>> > build warning-free on 32bit, but otherwise it's perfectly fine.
>>>>
>>>> Because this driver is written for ARM64 SoCs.
>>>
>>> It makes compile-testing harder, the same reasons why depending upon
>>
>> What compile-testing we will have? I just try to understand the problem.
>
> it is useful for others who don't have the hw to be able to compile
> test core changes (hence kconfig COMPILE_TEST option) to at least
> catch the sorts of problems that compilers can catch..

Understand! Thanks Rob.

-xinliang

>
> BR,
> -R
>
>
>> Thanks,
>> -xinliang
>>
>>> specific arm platforms is really annoying (but lukily that problem seems
>>> to have stopped being one for the drm subsystem at least). Depending on
>>> CONFIG_OF and other stuff that's really needed is perfectly fine, but imo
>>> depending upon specific platforms and stuff really isn't.
>>> -Daniel
>>>
>>>>
>>>> Thanks,
>>>> -xinliang
>>>>
>>>> >
>>>> > Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
>>>> > Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
>>>> > Cc: Chen Feng <puck.chen@hisilicon.com>
>>>> > Cc: Sean Paul <seanpaul@chromium.org>
>>>> > Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev")
>>>> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>>> > ---
>>>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++-------
>>>> >  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++--
>>>> >  2 files changed, 4 insertions(+), 9 deletions(-)
>>>> >
>>>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>>> > index 91188f33b1d9..c64c82cb7e71 100644
>>>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
>>>> > @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx)
>>>> >
>>>> >  static int ade_drm_init(struct platform_device *pdev)
>>>> >  {
>>>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>>>> > +       struct drm_device *dev = platform_get_drvdata(pdev);
>>>> >         struct ade_data *ade;
>>>> >         struct ade_hw_ctx *ctx;
>>>> >         struct ade_crtc *acrtc;
>>>> > @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev)
>>>> >
>>>> >  static void ade_drm_cleanup(struct platform_device *pdev)
>>>> >  {
>>>> > -       struct drm_device *drm_dev = platform_get_drvdata(dev);
>>>> > -       struct ade_data *ade = platform_get_drvdata(pdev);
>>>> > -       struct drm_crtc *crtc = &ade->acrtc.base;
>>>> > -
>>>> > -       drm_crtc_cleanup(crtc);
>>>> >  }
>>>> >
>>>> >  const struct kirin_dc_ops ade_dc_ops = {
>>>> >         .init = ade_drm_init,
>>>> >         .cleanup = ade_drm_cleanup
>>>> > -;
>>>> > +};
>>>> > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>>> > index 6b0f9f6c16e1..b9b8c25da5e3 100644
>>>> > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>>> > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
>>>> > @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>>>> >         kirin_drm_mode_config_init(dev);
>>>> >
>>>> >         /* display controller init */
>>>> > -       ret = dc_ops->init(to_platform_device(dev));
>>>> > +       ret = dc_ops->init(to_platform_device(dev->dev));
>>>> >         if (ret)
>>>> >                 goto err_mode_config_cleanup;
>>>> >
>>>> > @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>>>> >  err_unbind_all:
>>>> >         component_unbind_all(dev->dev, dev);
>>>> >  err_dc_cleanup:
>>>> > -       dc_ops->cleanup(dev);
>>>> > +       dc_ops->cleanup(to_platform_device(dev->dev));
>>>> >  err_mode_config_cleanup:
>>>> >         drm_mode_config_cleanup(dev);
>>>> >         devm_kfree(dev->dev, priv);
>>>> > --
>>>> > 2.8.1
>>>> >
>>>> > _______________________________________________
>>>> > dri-devel mailing list
>>>> > dri-devel@lists.freedesktop.org
>>>> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
>>> --
>>> Daniel Vetter
>>> Software Engineer, Intel Corporation
>>> http://blog.ffwll.ch
>> _______________________________________________
>> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-09-01  3:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 10:17 [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Vetter
2016-08-17 10:17 ` [PATCH 2/2] drm/hisilicon: Make it compile again Daniel Vetter
2016-08-17 11:02   ` Xinliang Liu
2016-08-17 11:11     ` Daniel Vetter
2016-08-26  1:48       ` Xinliang Liu
2016-08-26  2:28         ` Rob Clark
2016-09-01  3:33           ` Xinliang Liu
2016-08-17 13:58 ` [PATCH 1/2] drm/hisilicon: Allow compile-testing on arm Daniel Stone

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.