Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5354242rwp; Mon, 17 Jul 2023 02:35:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlHruEi08L0ZLTcQr1wTQr1oLxaLjGnu4yLJvqaYmoORx5lpCdDhMHWUPTj4sNdOmX6irnIk X-Received: by 2002:a17:907:cca2:b0:994:1844:caec with SMTP id up34-20020a170907cca200b009941844caecmr7993719ejc.77.1689586505979; Mon, 17 Jul 2023 02:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689586505; cv=none; d=google.com; s=arc-20160816; b=vxAkcywEJzaTkj5Ac1KqdmL0/KrAEmygWBt48Fe59i3PGIDuPyQNfvc9qOIuXR+40S dGJjIPVRC24fajaTYnG9TGwbVg2fBLU/8kjWExd721+MFYb1Jn7YeK1G5i2esO/rzD7q CaOnK3h6EGidL76pQeGfm2rKUls74u7d8OHwaGzmuF8PnGdprG461BYGEU0CguZ9GNZt UovHiG6ImnMm4Vx7XBuVjh1Aq3l5jNuIt5BAv/4vbzpLx2uLe4PMj25CdsMmRn2lwA/i 89auQ+ugXrWLrR7kyL0lJ/pMO1wbYkhqdJF5eH2unpuT524uYQySSJmTaH8het+YrmI5 ewaQ== 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=Itt90Gux0jb2OT7jpr0Odfrrivk8UdcQyUry5wTCds4=; fh=o9UkXndThvbjUpxQh5xpuPJk3ZnJFcmZAeqsMhQuqa0=; b=Ph5Iwt4NUjNTRFVbXJxA9qLMRe4eIlhLkCU7IGGJl3RvJhAwpp1zD6ihst1/4053Yk 4fatZgqVPIpaH/ujOWKFLmWE3Yc+VZ1ntFj2wqf5Y5eCBEmL7/fsApPYBj4sqVBYOZjb ut5h9KzUQP7JDWwwUpt0Bh3amDROM8V5cAE+M1IIKmnARu5gPiDZaLOsv0bCd4tIFsup gph+fIPcHZzJgzIVkApOMGvkXiVWI8hMZOOvaVV7LVhnDe2I11gJnSJfrAHnp4ozT17U gbP7MsBhDIA3zLFVghtWa13P5xZeWqf4QMzypBLN5VhXZ3qom0wRj/1+yJU3Qi9GLofk v6kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e0JX2Flm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a170906495400b00991df86ac0esi13125738ejt.338.2023.07.17.02.34.38; Mon, 17 Jul 2023 02:35:05 -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=@redhat.com header.s=mimecast20190719 header.b=e0JX2Flm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjGQJBB (ORCPT + 99 others); Mon, 17 Jul 2023 05:01:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbjGQJBA (ORCPT ); Mon, 17 Jul 2023 05:01:00 -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 ESMTPS id 08C2EA1 for ; Mon, 17 Jul 2023 02:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689584418; 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=Itt90Gux0jb2OT7jpr0Odfrrivk8UdcQyUry5wTCds4=; b=e0JX2FlmUqX/CXUbIyF5rlz0SdHOfFlsENQrLsdZe/2GnF4631f9izgb4dpuN/7XW/oteY YDCfQsngFVHnrkSuMZ1DU/4oBSu0S4XPqRU06dh6mR6B4W0Askh2M/gSxxmBeAUZgbCFWN yRjc0oWureNKrBzRVHKfaMm4wsmk/b4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-184-gntwG0boN8mEp3CVpR36xg-1; Mon, 17 Jul 2023 05:00:16 -0400 X-MC-Unique: gntwG0boN8mEp3CVpR36xg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fc00d7d62cso26378705e9.2 for ; Mon, 17 Jul 2023 02:00:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689584415; x=1692176415; 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=Itt90Gux0jb2OT7jpr0Odfrrivk8UdcQyUry5wTCds4=; b=hS5COUTtnfOAxYYKN9KauOWxMCEBii7jH08/1VOkmMrM6seI5l3Ggd9sDf6C/HeeVd bMhtnjahoCC+ajO95bpec709A3LJaofAfldZ/3UEl95aAyUyIKOHYhS8frCbDZmDJ+SK weMr3Y7L4GS5WSUDQck8XeWmhlXDOw3W7bBg/Hh/lMArecHpyZixwYwnHmfdmz+TJFMp ByRq+HSMcNOD4VTCp8O87PPIB2rhJrxIM9KotGYEtgzZdAphNhVtFn6k92FgXhOv/PiJ lFo87XPhbsWXaY2HFK3u1roTlKpz9Qb3bw79iM2l8af+RVPOValv2K8ZQJwXdCPCqZ5z 9W/w== X-Gm-Message-State: ABy/qLay/rehuhd1NkS+yC+Gb+A8iDP5SRndgqmB7yEH0NnCZlplpTt9 Ly6XWCaYRIQtVUCoBvKg281eF5jgokB7/OBf4P6Qd+Z95W8mAKwIalr4BRrxUcpIrkBjZZRaoNP GrozQiWyQQtErs9Tn7Y3TLWL3 X-Received: by 2002:a1c:6a14:0:b0:3fc:186:284d with SMTP id f20-20020a1c6a14000000b003fc0186284dmr9864514wmc.18.1689584415474; Mon, 17 Jul 2023 02:00:15 -0700 (PDT) X-Received: by 2002:a1c:6a14:0:b0:3fc:186:284d with SMTP id f20-20020a1c6a14000000b003fc0186284dmr9864495wmc.18.1689584415132; Mon, 17 Jul 2023 02:00:15 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id f17-20020a7bcd11000000b003fc02218d6csm7415959wmj.25.2023.07.17.02.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 02:00:14 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Geert Uytterhoeven Subject: Re: [PATCH] drm/ssd130x: Fix an oops when attempting to update a disabled plane In-Reply-To: References: <20230713163213.1028952-1-javierm@redhat.com> Date: Mon, 17 Jul 2023 11:00:13 +0200 Message-ID: <87r0p6kj4y.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,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 Thomas Zimmermann writes: Hello Thomas, > Hi > > Am 13.07.23 um 18:32 schrieb Javier Martinez Canillas: [...] >> >> +static const struct drm_mode_config_helper_funcs ssd130x_mode_config_helpers = { >> + .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm, >> +}; >> + > > After some discussion on IRC, I'd suggest to allocate the buffer > somewhere within probe. So it will always be there when the plane code runs. > Yes, that's also what Geert suggested so I'll just do that. And also make it a dev managed resource. > A full fix would be to allocate the buffer memory as part of the plane > state and/or the plane's atomic_check. That's a bit more complicated if > you want to shared the buffer memory across plane updates. > I don't think is worth the complexity, allocating it on probe and released when the device is unbound from the driver should be enough as Geert said. > Best regards > Thomas > > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat