[PATCH] drm/amdgpu: fix incompatible types in conditional expression

Alex Deucher alexdeucher at gmail.com
Tue Sep 5 15:38:59 UTC 2023


On Mon, Sep 4, 2023 at 1:00 AM Lang Yu <Lang.Yu at amd.com> wrote:
>
> Fixes: ab041551f4a7 ("drm/amdgpu: add VPE 6.1.0 support")
>
> Signed-off-by: Lang Yu <Lang.Yu at amd.com>
> Reported-by: kernel test robot <lkp at intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202309020608.FwP8QMht-lkp@intel.com

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h | 2 +-
>  drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c   | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
> index b590205d6a28..29d56f7ae4a9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
> @@ -31,7 +31,7 @@ struct amdgpu_vpe;
>
>  struct vpe_funcs {
>         uint32_t (*get_reg_offset)(struct amdgpu_vpe *vpe, uint32_t inst, uint32_t offset);
> -       void (*set_regs)(struct amdgpu_vpe *vpe);
> +       int (*set_regs)(struct amdgpu_vpe *vpe);
>         int (*irq_init)(struct amdgpu_vpe *vpe);
>         int (*init_microcode)(struct amdgpu_vpe *vpe);
>         int (*load_microcode)(struct amdgpu_vpe *vpe);
> diff --git a/drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c b/drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c
> index 1259b150dc96..756f39348dd9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vpe_v6_1.c
> @@ -254,13 +254,15 @@ static int vpe_v6_1_process_trap_irq(struct amdgpu_device *adev,
>         return 0;
>  }
>
> -static void vpe_v6_1_set_regs(struct amdgpu_vpe *vpe)
> +static int vpe_v6_1_set_regs(struct amdgpu_vpe *vpe)
>  {
>         vpe->regs.queue0_rb_rptr_lo = regVPEC_QUEUE0_RB_RPTR;
>         vpe->regs.queue0_rb_rptr_hi = regVPEC_QUEUE0_RB_RPTR_HI;
>         vpe->regs.queue0_rb_wptr_lo = regVPEC_QUEUE0_RB_WPTR;
>         vpe->regs.queue0_rb_wptr_hi = regVPEC_QUEUE0_RB_WPTR_HI;
>         vpe->regs.queue0_preempt = regVPEC_QUEUE0_PREEMPT;
> +
> +       return 0;
>  }
>
>  static const struct vpe_funcs vpe_v6_1_funcs = {
> --
> 2.25.1
>


More information about the amd-gfx mailing list