Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4147538rdb; Thu, 14 Sep 2023 13:16:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHptyoWNmbiS9fguAKFhG2rNoyDzi5/tde1iT28O2OZkr/Sm09n/+OlgIoET1e1eOWDmWTm X-Received: by 2002:a05:6a20:f391:b0:10c:7c72:bdf9 with SMTP id qr17-20020a056a20f39100b0010c7c72bdf9mr6294756pzb.29.1694722599520; Thu, 14 Sep 2023 13:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694722599; cv=none; d=google.com; s=arc-20160816; b=hmZmVpHChz/9QANlIV8kZ5/s1PdIfP9zTdFZecu2Q5k+2VTIBq9NzPYCguiEJqJTT7 fCW8Yq7R19PwGhO9C3SCxI5NX9Lti+67m7TsTAskaQD2uUv3YlC7tPF4iiTzcmDMUF8h F1mANKU/QnD1BnRkln0R5Tx20f26mRTnEbNw2eouQ26Vyt4U+b42I4jQSYB3B108NL2f XhdfYwjitmEqJPuHQY61qQi5MhUpjXSHdE3wPVoa0cDugABsU3/+s2/2mqDRzFjlHqbC WNRUvqg4WjeeT97r3OcfH3RZXnWxscHt4K4ctxd7m4Ag3xPGkAx+ZSS2UXA+c42wCatB /6PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=V0YL1s0r0RMXaZzIshNhC7a9mBahQAI6QCadmD8ScPA=; fh=Wzp+/0wgFgiy4e797E4K4ir2vrQogI1CyS+DIuk6awg=; b=d7eEDrrdOcylFn7QwOZBoSa2zcSk2ochD/w6n2P8pYqPyPHZuQXCZaRL9FcLbyK7tl xUkW8aU1ZZjBDfA0TA4xcYemqmezkajiHhy/G3KXqKq8XebxsfZEQnC72FOWllLmDCVa /CvxshZDAfg9zQkuc9Kh20FzK+7FuSVAMuNBxqjia3SzubPxNISx6IvoGCxcCt2/NJbs /QKI9VKoD1m0us7SXGIp8ShcGSxHbY4DyCPikFrTouOyeeV+r07S7mueAlug65K104r3 zT1i0j09n6YZbrbfuTTGVu7/zTbH+xmqQKS/+qL0kevJiemrkigwsNQh8egQoBG7jCu+ c/Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VVm2cIVp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id n11-20020a6546cb000000b00569161a1885si1978909pgr.288.2023.09.14.13.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:16:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VVm2cIVp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8F4EF8363C8A; Thu, 14 Sep 2023 09:39:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbjINQjO (ORCPT + 99 others); Thu, 14 Sep 2023 12:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbjINQjN (ORCPT ); Thu, 14 Sep 2023 12:39:13 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D89791FDC for ; Thu, 14 Sep 2023 09:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694709501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V0YL1s0r0RMXaZzIshNhC7a9mBahQAI6QCadmD8ScPA=; b=VVm2cIVpvOPy1Iqaki5WFhIMu46bkNomMHLv1lzkSUSb85/fChyIWhuK8uLrGlPKwsXque 0QywQy/fJvuRPXLKP/oAKND+Lpsjfi0L+OZ+IfWrsFsvnle9jARl4XFaj3L4JsHhiir/r9 zRDxFgag/gahf+fCBMgsvGlCu9IedBU= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-500-6-yp-sEYPmGZbB07lH4vFg-1; Thu, 14 Sep 2023 12:38:19 -0400 X-MC-Unique: 6-yp-sEYPmGZbB07lH4vFg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-31facb07f53so523739f8f.1 for ; Thu, 14 Sep 2023 09:38:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694709498; x=1695314298; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V0YL1s0r0RMXaZzIshNhC7a9mBahQAI6QCadmD8ScPA=; b=mGIijuZNHfQfqqtBKuKFrVKUi9tIEDD4pzTzcFHnywAA/Ekx0bS3dnokdbvSLUYDqh Sgcdv2WlX4QSeonsO46pIVofBZh9XXEG+uf7fnOEJokVyIOxyjmpIcrAHbYlRomg9rv6 kEHkOSH1NkMJRuf6IMMN6qBPyWHlymQhCvYpUO11SAreJyA3gMmHs4eUMbJgaTye9kF3 oT1GaHGHlb2pW9pDERnNd3mrGr7PAy0xOkxesnpzw4L6cn3rsZV6+KF+nhawSc0P7sZH 7wBkrGgguLbqY8Z1HwbcylJoEYFdj4z3xY7Nr2U5JvsEbUHh+AqBjCiKK2g7LUeLFE+b J3wQ== X-Gm-Message-State: AOJu0YxMRZ5MMNtEKm2mjCyq07TcAfYRHIN1OTLGhBBUkcYDdRmRpPKt AUDNY0/ZQM0PGvIWvx1Sfva0nwvP1hCfmTHhFVkOG68gOAgUVj/DA+n8J7r44Lq0aH0sjYPherq K04nP9I/wkyzHT+7x7gW57+mb X-Received: by 2002:adf:e84f:0:b0:313:e391:e492 with SMTP id d15-20020adfe84f000000b00313e391e492mr1880302wrn.17.1694709498617; Thu, 14 Sep 2023 09:38:18 -0700 (PDT) X-Received: by 2002:adf:e84f:0:b0:313:e391:e492 with SMTP id d15-20020adfe84f000000b00313e391e492mr1880286wrn.17.1694709498264; Thu, 14 Sep 2023 09:38:18 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id c1-20020a5d4141000000b0031f300a4c26sm2175932wrq.93.2023.09.14.09.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:38:17 -0700 (PDT) From: Javier Martinez Canillas To: Maxime Ripard Cc: linux-kernel@vger.kernel.org, Thomas Zimmermann , Geert Uytterhoeven , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v4] drm/ssd130x: Store the HW buffer in the driver-private CRTC state In-Reply-To: References: <20230913052938.1114651-1-javierm@redhat.com> <4norb2kxq4uxs3imi3qjxhyxpvnyf5cpl4sg7yyf3ydrykqhfl@cb3w4wstak7r> <871qf028ie.fsf@minerva.mail-host-address-is-not-set> Date: Thu, 14 Sep 2023 18:38:16 +0200 Message-ID: <8734zg677r.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 09:39:16 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Maxime Ripard writes: > On Thu, Sep 14, 2023 at 03:23:53PM +0200, Javier Martinez Canillas wrote: >> Maxime Ripard writes: >> >> Hello Maxime, >> >> > Hi, >> > >> > On Wed, Sep 13, 2023 at 07:29:25AM +0200, Javier Martinez Canillas wrote: >> >> static const struct drm_crtc_helper_funcs ssd130x_crtc_helper_funcs = { >> >> .mode_valid = ssd130x_crtc_helper_mode_valid, >> >> - .atomic_check = drm_crtc_helper_atomic_check, >> >> + .atomic_check = ssd130x_crtc_helper_atomic_check, >> >> }; >> > >> > Sorry I didn't catch that sooner, but there's no reason to call that >> > function a helper. >> > >> >> Yeah, agreed that there's no reason but others drivers already add the >> _helper prefix for struct drm_*_helper_funcs callbacks, and I did that >> in this driver as well to follow (what appears to be?) a convention. > > From a quick grep, it looks like it's the exception rather than the norm > Ah, I guess that was just unlucky when looking at others drivers as reference when writing this one. >> So I've to that now for the struct drm_crtc_helper_funcs handlers to be >> consistent with the rest of the driver, e.g for plane: >> >> static const struct drm_plane_helper_funcs ssd130x_primary_plane_helper_funcs = { >> DRM_GEM_SHADOW_PLANE_HELPER_FUNCS, >> .atomic_check = ssd130x_primary_plane_helper_atomic_check, >> .atomic_update = ssd130x_primary_plane_helper_atomic_update, >> .atomic_disable = ssd130x_primary_plane_helper_atomic_disable, >> }; >> >> static const struct drm_plane_funcs ssd130x_primary_plane_funcs = { >> .update_plane = drm_atomic_helper_update_plane, >> .disable_plane = drm_atomic_helper_disable_plane, >> .reset = ssd130x_primary_plane_reset, >> .atomic_duplicate_state = ssd130x_primary_plane_duplicate_state, >> .atomic_destroy_state = ssd130x_primary_plane_destroy_state, >> .destroy = drm_plane_cleanup, >> }; > > Ack. > > I still believe we should be removing the helper part, those are not > helpers. But it's not a big deal anyway. > Probably it comes down to semantics since one could argue that are helper functions in the driver that are used as callbacks. But yes, I agree that if is not the norm, it's better to get rid of those. I'll post a follow-up patch. > Maxime -- Best regards, Javier Martinez Canillas Core Platforms Red Hat