Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1942449ybt; Mon, 15 Jun 2020 13:35:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa8s86gki4Im+Xz7ZS+6ORWnK1YJcX6e1ebTbsCPLUfLi731mA2/R6A7UM85DxD17aXmy/ X-Received: by 2002:a17:906:9381:: with SMTP id l1mr28121255ejx.380.1592253348402; Mon, 15 Jun 2020 13:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592253348; cv=none; d=google.com; s=arc-20160816; b=uVfk7Q2Diq5vWjs6yuArtjKCfoZJjbybAJZQZUciqhRPaG3k1ujySWz2sRPjp7vJUi cpdq4pz5fYWOW1j9DnR6wvMxvnGBM67LgaYK4Bc2eO8kKKHNn+tKAhgpjolSF8v3ctxs lU5okdCyiffadRexgLYBcvsxa/6jaQlNy72EXarwVw0F8Sovunc0lHqyOGwk5iqhXnHJ Hfhs3PnO5zMDCEbwFHo6X/G8altJN3RgGUw6ynW6Sw0KNiApCtE1NuUYwyAd2NgKUW8Y DCAT+YqOK2q6jOM4wliDVk7p0yfdLmkfC+J0V4bxyWVa2PFMtgtxK/j/8PXtV2b1HdPH 2Hjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=F4SqwrBq2ep2fs8cr4Sw7wEkow/DpFtRxI0Q3/P6oZA=; b=tBv2RiOVnGPg7uU3KQsmm1yEBqPwF25EuT7qNvVBKa29ZpT6LE1Mv0EkbWg+wJPI25 6XJ0V44Jv5ApUwJcNmdcI6NPmej4oL9+ohHszCx38Z7JZCJzC4x7IRVHCdy6dzvp9SFm TJaNwn+0LDhuiiSzP8D5w7CrgOu8Ki01+F6nb5oVpvDCaQbpcjvvFKKopos4oIBQ91Dj ta/xTDSswkdm7Vjn6r4FRiRwBjrRjRu4lt2g4l0H864eijTKaqsOtIj/dIWZX2FdOyTY lQGxYZtZAVf+lsP8v3gi7UvdWH9yQQ5bnMhlJvTBQ5Rc3P3PqMP7PFFYHgV4f8WztjtU k3Pw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b22si8562063edw.120.2020.06.15.13.35.25; Mon, 15 Jun 2020 13:35:48 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731530AbgFOUbi (ORCPT + 99 others); Mon, 15 Jun 2020 16:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731475AbgFOUbZ (ORCPT ); Mon, 15 Jun 2020 16:31:25 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1657CC061A0E for ; Mon, 15 Jun 2020 13:31:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 144402A2CFB From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org, Collabora Kernel ML Cc: matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, laurent.pinchart@ideasonboard.com, Sam Ravnborg , Chun-Kuang Hu , Daniel Vetter , David Airlie , Philipp Zabel , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RESEND PATCH v4 5/7] drm/mediatek: mtk_dsi: Use simple encoder Date: Mon, 15 Jun 2020 22:31:06 +0200 Message-Id: <20200615203108.786083-6-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615203108.786083-1-enric.balletbo@collabora.com> References: <20200615203108.786083-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mtk_dsi driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Reviewed-by: Chun-Kuang Hu --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/mediatek/mtk_dsi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 759a5b37fb4d2..e02d16a086ac0 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -789,15 +789,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi) dsi->enabled = false; } -static void mtk_dsi_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs mtk_dsi_encoder_funcs = { - .destroy = mtk_dsi_encoder_destroy, -}; - static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi); static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi); @@ -1127,8 +1118,8 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi) { int ret; - ret = drm_encoder_init(drm, &dsi->encoder, &mtk_dsi_encoder_funcs, - DRM_MODE_ENCODER_DSI, NULL); + ret = drm_simple_encoder_init(drm, &dsi->encoder, + DRM_MODE_ENCODER_DSI); if (ret) { DRM_ERROR("Failed to encoder init to drm\n"); return ret; -- 2.27.0