Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16675318rwd; Mon, 26 Jun 2023 13:29:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TITCay98ZSQEaIdwllzjk9kTqUiMwFISGMl+IrR3hi35Fy2NqIN1jkKPlrmxhJUjLt445 X-Received: by 2002:a05:6a00:b44:b0:668:79d6:34df with SMTP id p4-20020a056a000b4400b0066879d634dfmr30561919pfo.23.1687811358732; Mon, 26 Jun 2023 13:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687811358; cv=none; d=google.com; s=arc-20160816; b=ygm7w+H2o8Hlq97qb86ksHe0VXKiIGkLi9wuEDXPLWK3jJZuEnO9wUTzAXMmjL6E1t zJRGR5xDjYSzG6dtognWzboUVcBQgJwbaHKaoDIWOTL2c+VA2VHAegnaQtg3k9gwkeYf SVL2YZE8ajwOFCiqWZVrVKOsfNcB5zPklQ4VvMsi9VCnjrEuUrbB3a5MO4blES6zCe2c djnv9uoWqCxP3tgYQVNhgtZQBmm3wrfZwd69ZcEWGJpvyFgg9hw5iKg5gEYemUEE7Vnv fnpyjKatknT+azzGV+QGKbAKy34aPTGKY2BSR+dXtlKfFC5wevb8+uqveZj/Y6IvHyHU 0fRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=HH3O/h9U4e4x7ApDSU3+rbilP/iWCVhv/eDCHxh4kVo=; fh=hDWpX2+vozItB7Fz23VEEVWy8zvnM/WunwFrdG7QPkY=; b=e78jqpsNkiuimNODlmXf6ZsR8PEvWdGTh6XBJaUztL5RbangEuOEqq0h2H33s+nHV0 H07gnCr9oL3RwO1kaC6Idw1s1xSAp4Xjg/qeLkjJsGyhPfZktgM0hyfgAgUlKKmB73IP QjRhCjpIRn3MPljkGdSNk7uHDmHF+RxLByHVVzQibnjZH29KjnpucnjovoDXuYamt7yO bmqlU6F/em3VvhmtHLvoqe33F60/I4Senm9XOmaoWBho9mzRGCKXMlia3CwBV/KVY603 Zzie+R8qNmMudSEn71Pq8L5uRLsxK+U66JIq6eJlCx5BwhYU3mNaoJTySgMEIE/UX7vN QU8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=T0TBnQT1; dkim=neutral (no key) header.i=@ravnborg.org header.b=9y4tez6l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020aa78893000000b00674689bacacsi3602328pfe.77.2023.06.26.13.29.06; Mon, 26 Jun 2023 13:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=T0TBnQT1; dkim=neutral (no key) header.i=@ravnborg.org header.b=9y4tez6l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229471AbjFZUU1 (ORCPT + 99 others); Mon, 26 Jun 2023 16:20:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjFZUUZ (ORCPT ); Mon, 26 Jun 2023 16:20:25 -0400 Received: from mailrelay6-1.pub.mailoutpod2-cph3.one.com (mailrelay6-1.pub.mailoutpod2-cph3.one.com [46.30.211.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C903D171F for ; Mon, 26 Jun 2023 13:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=HH3O/h9U4e4x7ApDSU3+rbilP/iWCVhv/eDCHxh4kVo=; b=T0TBnQT1eRYj5+PK6O9b4JezgAE8HGUuf3EqIznR7yjTP3byGuUGZVB0NpVM6v0NHph2S8l4w4Yig RjUEcYC0k2YHs4/+LJGzSA2RxcAK5JW8p4V70Y1MPcDZ17vHxbFD6pLQ3/ZwuAjcVGXztElBaUE9TL M72+HdDXfZS7JmvQY2LRAG6yOstR07M5g141BR18GFhnJJSODXcRVOI0PwmqI+dKo8a1zS297XHkjr Kh3SCqUL5Ig4ssxpIsSly36JxhtM1UXvTE9jv73Iv1dZ6f3DKFYxHLYRK7gKlZ/2ACkVapwX4IuEWy tpnhgNnNqYU3edETCo1325cYSH+mcsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=HH3O/h9U4e4x7ApDSU3+rbilP/iWCVhv/eDCHxh4kVo=; b=9y4tez6lwQh+SQWeTUZSHthxVuGzolmPlBCCnJAJwH1wb6OSjx61Brut1eWWY1b8SxG6Tx6go5INa 2mLwHLnDg== X-HalOne-ID: b28f4f00-145e-11ee-8bce-6f01c1d0a443 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay6 (Halon) with ESMTPSA id b28f4f00-145e-11ee-8bce-6f01c1d0a443; Mon, 26 Jun 2023 20:19:08 +0000 (UTC) Date: Mon, 26 Jun 2023 22:19:06 +0200 From: Sam Ravnborg To: Manikandan Muralidharan Cc: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, bbrezillon@kernel.org, airlied@gmail.com, daniel@ffwll.ch, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hari.PrasathGE@microchip.com, Balamanikandan.Gunasundar@microchip.com, Durai.ManickamKR@microchip.com, Nayabbasha.Sayed@microchip.com, Dharma.B@microchip.com, Varshini.Rajendran@microchip.com, Balakrishnan.S@microchip.com Subject: Re: [PATCH 3/9] drm: atmel-hlcdc: add LCD controller layer definition for SAM9X7 Message-ID: <20230626201906.GA11422@ravnborg.org> References: <20230613070426.467389-1-manikandan.m@microchip.com> <20230613070426.467389-4-manikandan.m@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613070426.467389-4-manikandan.m@microchip.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Manikandan, On Tue, Jun 13, 2023 at 12:34:20PM +0530, Manikandan Muralidharan wrote: > Add the LCD controller layer definition and descriptor structure for SAM9X7 > for the following layers, > - Base Layer > - Overlay1 Layer > - Overlay2 Layer > - High End Overlay > > Signed-off-by: Manikandan Muralidharan > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 96 ++++++++++++++++++++ > 1 file changed, 96 insertions(+) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > index fa0f9a93d50d..d7ad828e9e8c 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > @@ -462,6 +462,98 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sam9x60 = { > .layers = atmel_hlcdc_sam9x60_layers, > }; > > +static const struct atmel_hlcdc_layer_desc atmel_xlcdc_sam9x7_layers[] = { > + { > + .name = "base", > + .formats = &atmel_hlcdc_plane_rgb_formats, > + .regs_offset = 0x60, > + .id = 0, > + .type = ATMEL_HLCDC_BASE_LAYER, > + .cfgs_offset = 0x1c, > + .layout = { > + .xstride = { 2 }, > + .default_color = 3, > + .general_config = 4, > + .disc_pos = 5, > + .disc_size = 6, > + }, > + .clut_offset = 0x700, > + }, > + { > + .name = "overlay1", > + .formats = &atmel_hlcdc_plane_rgb_formats, > + .regs_offset = 0x160, > + .id = 1, > + .type = ATMEL_HLCDC_OVERLAY_LAYER, > + .cfgs_offset = 0x1c, > + .layout = { > + .pos = 2, > + .size = 3, > + .xstride = { 4 }, > + .pstride = { 5 }, > + .default_color = 6, > + .chroma_key = 7, > + .chroma_key_mask = 8, > + .general_config = 9, > + }, > + .clut_offset = 0xb00, > + }, > + { > + .name = "overlay2", > + .formats = &atmel_hlcdc_plane_rgb_formats, > + .regs_offset = 0x260, > + .id = 2, > + .type = ATMEL_HLCDC_OVERLAY_LAYER, > + .cfgs_offset = 0x1c, > + .layout = { > + .pos = 2, > + .size = 3, > + .xstride = { 4 }, > + .pstride = { 5 }, > + .default_color = 6, > + .chroma_key = 7, > + .chroma_key_mask = 8, > + .general_config = 9, > + }, > + .clut_offset = 0xf00, > + }, > + { > + .name = "high-end-overlay", > + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, > + .regs_offset = 0x360, > + .id = 3, > + .type = ATMEL_HLCDC_OVERLAY_LAYER, > + .cfgs_offset = 0x30, > + .layout = { > + .pos = 2, > + .size = 3, > + .memsize = 4, > + .xstride = { 5, 7 }, > + .pstride = { 6, 8 }, > + .default_color = 9, > + .chroma_key = 10, > + .chroma_key_mask = 11, > + .general_config = 12, > + .csc = 16, > + .scaler_config = 23, > + }, > + .clut_offset = 0x1300, > + }, > +}; > + > +static const struct atmel_hlcdc_dc_desc atmel_xlcdc_dc_sam9x7 = { > + .min_width = 0, > + .min_height = 0, > + .max_width = 2048, > + .max_height = 2048, > + .max_spw = 0xff, > + .max_vpw = 0xff, > + .max_hpw = 0x3ff, > + .fixed_clksrc = true, > + .nlayers = ARRAY_SIZE(atmel_xlcdc_sam9x7_layers), > + .layers = atmel_xlcdc_sam9x7_layers, > +}; As already suggested by someone else, add is_xlcdc to struct atmel_hlcdc_dc_desc, so the check for the compatible can be dropped. It would be better to put it here. Sam