Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753058AbdFVI0I convert rfc822-to-8bit (ORCPT ); Thu, 22 Jun 2017 04:26:08 -0400 Received: from gloria.sntech.de ([95.129.55.99]:47954 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753040AbdFVI0F (ORCPT ); Thu, 22 Jun 2017 04:26:05 -0400 From: Heiko Stuebner To: Mark yao Cc: Mark Rutland , devicetree@vger.kernel.org, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Rob Herring , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3.1 1/3] drm/rockchip: dw_hdmi: add RK3399 HDMI support Date: Thu, 22 Jun 2017 10:25:49 +0200 Message-ID: <2895576.2l0uxY0YQ7@phil> User-Agent: KMail/5.2.3 (Linux/4.9.0-2-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <594B79A4.1000509@rock-chips.com> References: <1496992236-10634-1-git-send-email-mark.yao@rock-chips.com> <1751555.73cFbViMXZ@phil> <594B79A4.1000509@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1121 Lines: 23 Am Donnerstag, 22. Juni 2017, 16:02:44 CEST schrieb Mark yao: > On 2017年06月22日 15:31, Heiko Stuebner wrote: > >> + > >> >+/** > >> >+ * struct rockchip_hdmi_chip_data - splite the grf setting of kind of chips > >> >+ * @lcdsel_grf_reg: grf register offset of lcdc select > >> >+ * @lcdsel_big: reg value of selecting vop big for HDMI > >> >+ * @lcdsel_lit: reg value of selecting vop little for HDMI > >> >+ */ > >> >+struct rockchip_hdmi_chip_data { > >> >+ u32 lcdsel_grf_reg; > > How do you plan on handling the rk3368 (with only one VOP and thus > > no selection happening)? I'd just make the above an int, so we could > > set it to -1 for that case. (value 0 is after all a valid reg). > > It's a problem handling on rk3368, using -1 to judge means that we need > initial the lcdsel_grf_reg to -1 on rk3368 platform, we need always add a platform > data to handle it, seems not good enough. > > Since the hdmi chip data only use for vop selection, maybe we can judge with > checking hdmi->chip_data == NULL for the case. yeah, that could work as well ... as long as the grf-vop-select is the only chip-data