Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp724800lqt; Tue, 19 Mar 2024 01:36:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2bYUzeqCmFtl16tFgSwpouzk1BcCwQTmdSFrW5RAKck4krW2gOdwXjBcz0fmOQHknxk8JV6WUkoFL+5UxgjHL4qG8AhQEP5xTB9x14Q== X-Google-Smtp-Source: AGHT+IFWEiGXXA81wbnsLnEj3dy4cqTocItw26WPCdJqrucO8kfqT/r9q1cbgz5XVSJwYPn0nU8D X-Received: by 2002:a05:620a:17a2:b0:78a:14be:f3e9 with SMTP id ay34-20020a05620a17a200b0078a14bef3e9mr1044764qkb.48.1710837366553; Tue, 19 Mar 2024 01:36:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710837366; cv=pass; d=google.com; s=arc-20160816; b=d3kWPPczTfGWtBV0vBkvkaGgPLW+nIbVLmsCmTU/J0CniD39QX2coPOEDrzXDrnzyD jRKr3C75djO5dQQYH9CFbgNEcb2DRlefthW3SNqNl7bhRQpliV8hGwZeNr5p04yySh/0 gqfAt0fgNdX1J1Pm3po1tGqDij+B4iMuYccELmtCJoQfaCJwOW44tnuJiDwCtlztWkFs o0TMZvK68Vgp8eputfl8bYM9Y45lvDFsgpQPCe4A6hEwKukljQo7rX3jtFnXE2azajzb byULacZhRzUfJF5mrWD8fUrcRbjX4eTzGapaN4/AiJNkHShTRbxx5u5RwwvQMvOOj5NC hQzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=QDQ8BGnF0EPZ6BvnbghWANat2RUqDRmHdJvdpWEN6cc=; fh=3poA8xgsIdBy4dW6WOx+QQXubM2obsrm0+xLPJHIUWM=; b=zplktzq/44Ev/md5YCXN6D8D3U+i8ZymWvrMj2z0Hggl7uU6dgN7tdkzWeo5nToMj2 3MJ/nIBBt/YtmOu+PBdHNC9A4aNd8MQkJ1Hrt+RekOYHfHJFE+O1E9VEi/E3TTBroo2l SkledIsiNkwXAlchY7zKlc+b4foqnhl1NcKjBcfXVP+tx7LV3bGgDQFCukihsoWLE71U GAYkIqyLALbAo/L94PdsKiWQjaVWGxCoGFpOJAr7rJn8u8pA5NU2p9u2T77xzefh95Je Sn9+81dJsM8+L272DllWR7wLKyYqX5ALlzv9j9qIFEosuWXKSVxqEp1U03exXf4SbB03 eRSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="rRfbE/T3"; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="rRfbE/T3"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-107255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f25-20020a05620a12f900b00789dd3e491bsi9677465qkl.235.2024.03.19.01.36.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 01:36:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="rRfbE/T3"; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="rRfbE/T3"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-107255-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3BB351C21BD2 for ; Tue, 19 Mar 2024 08:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8DDC55769; Tue, 19 Mar 2024 08:36:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rRfbE/T3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2yhlVDNT"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rRfbE/T3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2yhlVDNT" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CDE154BCB for ; Tue, 19 Mar 2024 08:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710837359; cv=none; b=assdthBzJpyxKO2LAdb8S57wT82a8Tk7uCZQEMMXd14KaXveHDq7uwXJdXaajbazOAQtu7Y1Bp5INozmr7hknFHoLMwLeIT/82koTjfMtvra/Vcrdxqx2ftyJpPFjH8lVnGByFgqpeIfskh2NWD/X6K/Evpde07TN9SejPbkOUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710837359; c=relaxed/simple; bh=wIpGG5R6KkYoemAVk2Sazcjr1VHV8sWaDJxHwhXckco=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=m4KEDrNjOLbjPgnAcEjgQpk8R4tZBl/sElgu6g7OOGqZKExv5raYgpGmbt+qKMBaD4ppegF9puethu4w9mTffXvBoOj2Fas8vvNIeeKak9gKbUlBqB2s7X9OHwjXn0eQqoUUcxySsLcoIVp+HiCckAx6MXZnXiieA5II8GE/vY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rRfbE/T3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2yhlVDNT; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rRfbE/T3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2yhlVDNT; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 956293754A; Tue, 19 Mar 2024 08:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710837349; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDQ8BGnF0EPZ6BvnbghWANat2RUqDRmHdJvdpWEN6cc=; b=rRfbE/T3bKNK79atff7gLWbKhySNwYIaTxu1knYeWKmzfWTuMv0Bta4NivzOYJCWtOIhWi DLLJt9saiehXOsekoJiqHbb1vXIjLKw9o3UA/MWW/t+Cats3ZKP/0vidM5yXoC1fzeDAFg jNJfgZG+On8GLO+KNRF92Bt0IZJckY4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710837349; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDQ8BGnF0EPZ6BvnbghWANat2RUqDRmHdJvdpWEN6cc=; b=2yhlVDNT+fpy/tNC79+octfyHoQJU8dtnDIubFpIX6xOHfdjNpODLdqs2gqr7uh/SzO0BM LmwwpEr1cCFjMVBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1710837349; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDQ8BGnF0EPZ6BvnbghWANat2RUqDRmHdJvdpWEN6cc=; b=rRfbE/T3bKNK79atff7gLWbKhySNwYIaTxu1knYeWKmzfWTuMv0Bta4NivzOYJCWtOIhWi DLLJt9saiehXOsekoJiqHbb1vXIjLKw9o3UA/MWW/t+Cats3ZKP/0vidM5yXoC1fzeDAFg jNJfgZG+On8GLO+KNRF92Bt0IZJckY4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1710837349; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QDQ8BGnF0EPZ6BvnbghWANat2RUqDRmHdJvdpWEN6cc=; b=2yhlVDNT+fpy/tNC79+octfyHoQJU8dtnDIubFpIX6xOHfdjNpODLdqs2gqr7uh/SzO0BM LmwwpEr1cCFjMVBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6CDC0136D6; Tue, 19 Mar 2024 08:35:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id imQ3GWVO+WXXfwAAD6G6ig (envelope-from ); Tue, 19 Mar 2024 08:35:49 +0000 Message-ID: Date: Tue, 19 Mar 2024 09:35:48 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: drm/tiny: QUESTION: What to use instead of drm_simple_display_pipe ? To: Mehdi Djait , daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: Thomas Zimmermann Autocrypt: addr=tzimmermann@suse.de; keydata= xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdg XH47fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0 BeB5BbqP5er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A EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: * X-Spam-Score: 1.20 X-Spamd-Result: default: False [1.20 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BAYES_HAM(-0.01)[49.13%]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com,ffwll.ch,linux.intel.com,lists.freedesktop.org,vger.kernel.org]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Flag: NO Hi Am 18.03.24 um 20:18 schrieb Mehdi Djait: > Hello everyone :) > > I am implementing a tiny drm driver and I am currently working on the > V2: https://lore.kernel.org/dri-devel/cover.1701267411.git.mehdi.djait@bootlin.com/ > > I got a review on the v1 telling me not to use the > drm_simple_display_pipe. Can someone please explain this further ? Or > give me an example drm driver that does it the right way ? You can copy the code from drm_simple_kms_helper.c into your driver file and start inlining everything. For example  1) Your driver calls drm_simple_display_pipe_init(), so you copy that code into your source file  2) drm_simple_display_pipe_init() uses drm_simple_kms_plane_funcs and drm_simple_kms_crtc_funcs, so you copy these into your source file; together with the drm_simple_kms_*() helpers that they use for their callback pointers.  3) Mayb do this for other drm_simple_kms_*() code.  4) Then start inlining: inline your copy of drm_simple_display_pipe_iit(). Instead of using sharp_ls027b7dh01_pipe_funcs, inline its functions into your copy of the callers. And so on.  5) Rename the resulting code, so that it fits you driver. With careful changes, you 'll end up with the same functionality as before, but without the intermediate layer of the simple-KMS code. Best regards Thomas > > -- > Kind Regards > Mehdi Djait -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)