From patchwork Mon Feb 20 08:02:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 9582123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C2326047C for ; Mon, 20 Feb 2017 08:05:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B291287FB for ; Mon, 20 Feb 2017 08:05:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E1C928851; Mon, 20 Feb 2017 08:05:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F1B4287FB for ; Mon, 20 Feb 2017 08:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=couMz+ytHCWFm1Av21kPoi53Cf03uYGTzaoNLUHgmAY=; b=XXYNR4qDeU9jgoO9BQiT5RDLTx fvUE17sKBF1/G2HbawhV6l2PNxpG9pIH2v+dHLVozTwogY8guJJ+GfsF60GrHYWsQDDHwBKFAT3Zp 9Ljz+7kwVcMPHJX2X380zkKxz8qbwyGi3JXjPZjmahiUHTZjgbCQ80cRaMF+2oMsx1UssgAK4mRdl 3GWXo7pe+B9BafT26uDRBT/ORtQUhyFwUy2bMhluXC0fOKc7317Ncr8TCJbw9hu7MCbe9jbCsvYDD dt8HQxCtavpgMe5uWFbJGf4r6qTjEN2zNAwbm+3QheLjwduIVjGEIPZE5EQa56PHtoYpi3IT2d11w rGBzLHaw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cfiyp-0002rG-Mi; Mon, 20 Feb 2017 08:05:55 +0000 Received: from mail-pf0-f196.google.com ([209.85.192.196]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cfiwA-0000A3-9U; Mon, 20 Feb 2017 08:03:14 +0000 Received: by mail-pf0-f196.google.com with SMTP id o64so8552504pfb.1; Mon, 20 Feb 2017 00:02:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+IOO/DnrrmTDIF5FnUYKrxNkpuKUNiSRg7AfTBknG+M=; b=echcucPE9cKeEblUYJQoBuFzfQYUsQ9Nu9VUsAeWyQSwndQKLS4zOwD0kJxW9rdKzL KaKLdwtLmINZUC/yz/N6REyjzIlQ4glbIcMCfho5oRk2eoAv+80Pg4oHPokLK2vitL4H kyTBawaHJTAX8fOOqG7BxjgzsF0h2U9G3gVQu7nwmzGn9P0beqVzEJ90dGg+xywUwUKi 0Bh12nXVJOiRx9uiNmKVe9JGEThiqJZrARACkGEMjpAIZfUfYQuutF9ZusOhvM/rJ0SU z1hAGxp771jWB9RON7nCeC3f5zqsPvYdFnx+l2tjtdbD6lTxjByQhZOUG64qyXcJYodJ yTFw== X-Gm-Message-State: AMke39m72mPK3EWwQooswMXtpVopMY90Ns9qvDgkfL3axG5nB2GP8E/gDIX/H52fLUCb+g== X-Received: by 10.84.233.194 with SMTP id m2mr30051037pln.126.1487577768947; Mon, 20 Feb 2017 00:02:48 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id j127sm9998784pfg.89.2017.02.20.00.02.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Feb 2017 00:02:48 -0800 (PST) From: Chris Zhong To: john@metanate.com, dianders@chromium.org, tfiga@chromium.org, heiko@sntech.de, yzq@rock-chips.com, mark.rutland@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, galak@codeaurora.org, pawel.moll@arm.com, seanpaul@chromium.org Subject: [RESEND PATCH v7 4/7] drm/rockchip/dsi: remove mode_valid function Date: Mon, 20 Feb 2017 16:02:20 +0800 Message-Id: <1487577744-2855-5-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1487577744-2855-1-git-send-email-zyw@rock-chips.com> References: <1487577744-2855-1-git-send-email-zyw@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170220_000310_558092_07159086 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Chris Zhong , linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The MIPI DSI do not need check the validity of resolution, the max resolution should depend VOP. Hence, remove rk3288_mipi_dsi_mode_valid here. Signed-off-by: Chris Zhong --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 39 ---------------------------------- 1 file changed, 39 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index 836cb83..c2d7674 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -278,8 +278,6 @@ struct dw_mipi_dsi_plat_data { u32 grf_dsi0_mode; u32 grf_dsi0_mode_reg; unsigned int max_data_lanes; - enum drm_mode_status (*mode_valid)(struct drm_connector *connector, - struct drm_display_mode *mode); }; struct dw_mipi_dsi { @@ -1077,23 +1075,8 @@ static int dw_mipi_dsi_connector_get_modes(struct drm_connector *connector) return drm_panel_get_modes(dsi->panel); } -static enum drm_mode_status dw_mipi_dsi_mode_valid( - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - struct dw_mipi_dsi *dsi = con_to_dsi(connector); - - enum drm_mode_status mode_status = MODE_OK; - - if (dsi->pdata->mode_valid) - mode_status = dsi->pdata->mode_valid(connector, mode); - - return mode_status; -} - static struct drm_connector_helper_funcs dw_mipi_dsi_connector_helper_funcs = { .get_modes = dw_mipi_dsi_connector_get_modes, - .mode_valid = dw_mipi_dsi_mode_valid, }; static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector) @@ -1164,33 +1147,11 @@ static int rockchip_mipi_parse_dt(struct dw_mipi_dsi *dsi) return 0; } -static enum drm_mode_status rk3288_mipi_dsi_mode_valid( - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - /* - * The VID_PKT_SIZE field in the DSI_VID_PKT_CFG - * register is 11-bit. - */ - if (mode->hdisplay > 0x7ff) - return MODE_BAD_HVALUE; - - /* - * The V_ACTIVE_LINES field in the DSI_VTIMING_CFG - * register is 11-bit. - */ - if (mode->vdisplay > 0x7ff) - return MODE_BAD_VVALUE; - - return MODE_OK; -} - static struct dw_mipi_dsi_plat_data rk3288_mipi_dsi_drv_data = { .dsi0_en_bit = RK3288_DSI0_SEL_VOP_LIT, .dsi1_en_bit = RK3288_DSI1_SEL_VOP_LIT, .grf_switch_reg = RK3288_GRF_SOC_CON6, .max_data_lanes = 4, - .mode_valid = rk3288_mipi_dsi_mode_valid, }; static struct dw_mipi_dsi_plat_data rk3399_mipi_dsi_drv_data = {