Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1009936imm; Tue, 3 Jul 2018 04:04:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLVCerP1SgFvsj2rAoAOfvUdE7Jx6Bfz3mhtSICOR7OVJX3/p2RkmpUFpBb17lz0ZBvCpHu X-Received: by 2002:a17:902:583:: with SMTP id f3-v6mr29668213plf.115.1530615864308; Tue, 03 Jul 2018 04:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530615864; cv=none; d=google.com; s=arc-20160816; b=s4DW4bdCElRFXmhT2o3xmU9JsR4g64wIa3+pSzuGUySpEFLq7Q53rKgFqDjq1YKYTP cn40FqvPgTKuhvkfwY5xJ8KBGuV7L7Ea3dmYftiv6ZDNrseytMDMup+GoN7tRUCTInKD k1av06Q7Bj+hgwiQ+GOOwJxSTtMVsGe0+nvV+8FJcmvijKnYrMouOU+z4SZo0FKYUGN0 O+ojNTrHiKK5YPbaAIE/Ls9dQIGTdfq5HalOjngFuBMhOeVJa6NKjotKqP3XbAEvvj0n yXLlp7cjR3p81qrIq6XorZbFepyuGSDiAxgzg3oNUIAP+VxWhKXELGL1qtUuZ1dP1Pd2 0Q+g== 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 :arc-authentication-results; bh=vkJalQByZnnrkX5Eb3kVVra9GYm4j1tJr4dmW5M+RgM=; b=EKAfN1g3qHaLegORLCkI9FEctlvSAB6QhQIb3SjTJWGaAZYRa5iB8d4NfL1aW8Ww1n hzCJMGWVa1TPW/Qr34DdD7qb+yJ0wrvU2V8uNc0WT4jzVrRCiA/O2BPjkH1s7Zii8jza bRCHbvbdF5OB+xJsNInXPFVm1xz21c1DtaiaGi3ud/NptkxcVF/XQhZ4QFbJALJ0zL6R adT5Ev6YWrLIZ/rmxiSqZBzR7gIq+SIZ3WgV02QhzPNE7hf6Ff+gD1GWxhf8wuyUmxiZ uhqO1j/t2vqRpBfFscU+j74LcTYyE5bhL32ZjOvmIBr38MqONI1G8OCRIMqZKhFERJyP +uGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd3-v6si818058plb.171.2018.07.03.04.04.09; Tue, 03 Jul 2018 04:04:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbeGCLDa (ORCPT + 99 others); Tue, 3 Jul 2018 07:03:30 -0400 Received: from gloria.sntech.de ([185.11.138.130]:42966 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215AbeGCLD3 (ORCPT ); Tue, 3 Jul 2018 07:03:29 -0400 Received: from ip5f5b7f77.dynamic.kabel-deutschland.de ([95.91.127.119] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1faJ5V-0001Tf-Dw; Tue, 03 Jul 2018 13:03:13 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Damian Kos Cc: David Airlie , Rob Herring , Mark Rutland , Gustavo Padovan , Maarten Lankhorst , Sean Paul , Sandy Huang , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, ltyrala@cadence.com, pgaj@cadence.com, stelford@cadence.com Subject: Re: [PATCH 12/12] drm/rockchip: add support for CDNS MHDP IP controller. Date: Tue, 03 Jul 2018 13:03:11 +0200 Message-ID: <2647490.Uuqs1CuF1U@diego> In-Reply-To: <1530612152-27555-13-git-send-email-dkos@cadence.com> References: <1530612152-27555-1-git-send-email-dkos@cadence.com> <1530612152-27555-13-git-send-email-dkos@cadence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Damien, it's very cool to see collaboration from vendors on this. Am Dienstag, 3. Juli 2018, 12:02:23 CEST schrieb Damian Kos: > It would be really nice to explain a bit about the added controller support in the commit message, so that people reviewing the patch can get a feeling for it. > Signed-off-by: Damian Kos > --- > drivers/gpu/drm/rockchip/cdn-dp-core.c | 953 > +++++++++++++++++++++++++++++++- drivers/gpu/drm/rockchip/cdn-dp-core.h | > 25 + > drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +- > drivers/gpu/drm/rockchip/cdn-dp-reg.h | 4 + From the changes below, it looks that this seems to add support for a bridge chip based on that IP block. So it seems like the bridge+glue driver model would be a perfect fit for this, instead of stapling this onto the Rockchip-specific driver. So essentially, you could take the Rockchip cdn-dp driver, move the common parts to drivers/gpu/drm/bridge and then create separate glue drivers for both Rockchip and your external bridge IP block. This would prevent code duplication and also allow your bridge driver to be compiled without the Rockchip drm being present :-) . And also pave the way for future socs using your DP ip block. Nowadays we have quite a number of examples you could take as inspiration for this: - bridge/analogix/* (shared between Exynos and Rockchip right now) - bridge/synopsys/dw-hdmi* (shared between a quite big number of users) - bridge/synopsys/dw-mipi-dsi.c (shared between Rockchip [pending] and stm) Thanks Heiko