Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp8865281pxu; Sun, 27 Dec 2020 23:37:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5sI8zbOP5F8B5BNgah82KlrqU9sHo6+DPpYZbSTT/ZRV83p3b32T4RWywbn/E9Br07iuz X-Received: by 2002:a17:906:30d3:: with SMTP id b19mr33796008ejb.538.1609141038024; Sun, 27 Dec 2020 23:37:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609141038; cv=none; d=google.com; s=arc-20160816; b=vVBn9PeZkcFdl0UoDRFSMx631dp8rcUqO1rO7Jj8jKlZF9Eg8g8/hYCRBV5gOKat9p BXwrrdw7rr3SE5CKu5eCPutGbG+GfHPu3t3RMcgjiuJrn0V0dpHVYqLyz+b3nWPOFBmr vvOzGPSQ1WV3VoycvsfcPbutLRCeYfAILAnG9Go9fD8XNvOjRq8n8t+i2X9N1c9QpL/j NjzGHdIsyQJv5zE10s5Yq3fL9M2A4tHGFIkqKaK7UodHjy+cQqUy2f+ShvQoQESK7hFT rhGA3n5kDQyzbZP63sN4TUcK9Pvrit4YoCoylfoDz2tyoZ7n55FLC3d1+fOVWGlnRDsL zXzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=N91Lk3SI9YeucblYBJDEL0mxdgvmggUnZXXxz+fjnlo=; b=uK0XRSF9YqQTm1ZAyPDSTTAABxDz3ypeDy68RWYYHAJxoUNX9b4c9qP3JQHiXaVWIV jGlr1KXJT2ZLnbs+Ch2yWO/9bH1PQKbLPyq9jJYK/K/ii7Jrv6mRZreCQOikE8XFz0hZ SzrjITxhzmK5BGPcusOXuCtOogXaJPZFv2sjZp0B/ONpdll62wzOgCNUdIw4XmdAAcUj p2OLVDDIX17xk6PCWfAnYFpRMkAd2DbVk1+Z1WddSJFflC6yjQ0DWAsC+XBKLkAaND7/ u/1O0zDLnxvlI+cDu1pWOu6ypR2BL2zvUJR8pnKBVQsoMzXkj6bEHnw06PlBIonZ/2QS wgug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si17763137ejo.619.2020.12.27.23.36.56; Sun, 27 Dec 2020 23:37:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726469AbgL1HgV (ORCPT + 99 others); Mon, 28 Dec 2020 02:36:21 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:9938 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbgL1HgV (ORCPT ); Mon, 28 Dec 2020 02:36:21 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4D48TK3jNkzhyP1; Mon, 28 Dec 2020 15:35:01 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Mon, 28 Dec 2020 15:35:34 +0800 From: Tian Tao To: , , , , , , , , Subject: [PATCH] drm/hisilicon: Use simple encoder Date: Mon, 28 Dec 2020 15:35:36 +0800 Message-ID: <1609140936-57002-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hibmc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c index d35548d..c76f996 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "hibmc_drm_drv.h" #include "hibmc_drm_regs.h" @@ -90,10 +91,6 @@ static const struct drm_encoder_helper_funcs hibmc_encoder_helper_funcs = { .mode_set = hibmc_encoder_mode_set, }; -static const struct drm_encoder_funcs hibmc_encoder_funcs = { - .destroy = drm_encoder_cleanup, -}; - int hibmc_vdac_init(struct hibmc_drm_private *priv) { struct drm_device *dev = &priv->dev; @@ -109,8 +106,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv) } encoder->possible_crtcs = 0x1; - ret = drm_encoder_init(dev, encoder, &hibmc_encoder_funcs, - DRM_MODE_ENCODER_DAC, NULL); + ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC); if (ret) { drm_err(dev, "failed to init encoder: %d\n", ret); return ret; -- 2.7.4