[Intel-gfx] [PATCH 07/37] drm: Extract drm_vblank.[hc]

Stefan Agner stefan at agner.ch
Mon May 29 19:36:54 UTC 2017


On 2017-05-24 07:51, Daniel Vetter wrote:
> drm_irq.c contains both the irq helper library (optional) and the
> vblank support (optional, but part of the modeset uapi, and doesn't
> require the use of the irq helpers at all.
> 
> Split this up for more clarity of the scope of the individual bits.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  Documentation/gpu/drm-kms.rst |    4 +-
>  drivers/gpu/drm/drm_irq.c     | 1623 +---------------------------------------
>  drivers/gpu/drm/drm_vblank.c  | 1645 +++++++++++++++++++++++++++++++++++++++++
>  include/drm/drmP.h            |    5 +-
>  include/drm/drm_file.h        |    1 +
>  include/drm/drm_irq.h         |  158 +---
>  include/drm/drm_prime.h       |    2 +
>  include/drm/drm_vblank.h      |  181 +++++
>  8 files changed, 1857 insertions(+), 1762 deletions(-)
>  create mode 100644 drivers/gpu/drm/drm_vblank.c
>  create mode 100644 include/drm/drm_vblank.h
> 
> diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> index bfecd21a8cdf..2d77c9580164 100644
> --- a/Documentation/gpu/drm-kms.rst
> +++ b/Documentation/gpu/drm-kms.rst
> @@ -612,8 +612,8 @@ operation handler.
>  Vertical Blanking and Interrupt Handling Functions Reference
>  ------------------------------------------------------------
>  
> -.. kernel-doc:: include/drm/drm_irq.h
> +.. kernel-doc:: include/drm/drm_vblank.h
>     :internal:
>  
> -.. kernel-doc:: drivers/gpu/drm/drm_irq.c
> +.. kernel-doc:: drivers/gpu/drm/drm_vblank.c

Is that removing drm_irq from kernel-docs? Why? At least the C files
seems to contain valid kernel docs...

>     :export:
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index c7debaad67f8..28d736c3fcb4 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c

<snip>  

>  /**
>   * drm_irq_install - install IRQ handler
> @@ -571,7 +176,7 @@ int drm_irq_uninstall(struct drm_device *dev)
>  
>  			WARN_ON(drm_core_check_feature(dev, DRIVER_MODESET));
>  
> -			vblank_disable_and_save(dev, i);
> +			drm_vblank_disable_and_save(dev, i);

This leads to:

drivers/gpu/drm/drm_irq.c: In function 'drm_irq_uninstall':           
drivers/gpu/drm/drm_irq.c:179:4: error: implicit declaration of function
'drm_vblank_disable_and_save' [-Werror=implicit-function-declaration]   
                             
    drm_vblank_disable_and_save(dev, i);                              
    ^

Since you moved the function to drm_vblank.c, I guess you have to add a
deceleration in drm_vblank.h?

--
Stefan


More information about the Intel-gfx mailing list