From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3D68C48BDF for ; Thu, 10 Jun 2021 22:39:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E3DD613E7 for ; Thu, 10 Jun 2021 22:39:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E3DD613E7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02B406E1F4; Thu, 10 Jun 2021 22:39:04 +0000 (UTC) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6057E6E1F4 for ; Thu, 10 Jun 2021 22:39:03 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id f30so5664611lfj.1 for ; Thu, 10 Jun 2021 15:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IKiUR9q7IRH9RDtJ7qUTB3Y+piHrSfJz/dSB5CkqL7E=; b=ceuRDLcyzsXefbmdPG9I/V+E4/Nocd3hkdUSHq0c+42VDDPmzCp2roUJlnzRD2nEz8 ypMGjldMH6iDgQ2ea1xdCYVzd6FvrBn3bH0OH++GOK+KnCk0CLDv45trU0tSPccfygzD v/Ndnn4dDqNhfEj1qxZo8w2S0x3SVr1ZaUr+uBoRER/IpWZKkfmqdhLk6t68d6vUAupc 99QrXQ4OOK3uCkkC7ihTO80y5rMbHDS+8uddtf/RxsiiDfgcyu7gIMNqhzMmsvIVahyq q5//YVnPn/8wbNE09RbNlMZ1ff0LEgP9vF97R8hoJgui0n5F5+2aNUnBtrQNuf5J2GlC 4AgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IKiUR9q7IRH9RDtJ7qUTB3Y+piHrSfJz/dSB5CkqL7E=; b=tbgBHf1iZLCqJs4GTKQyiQfXO2eNoXkKNHe6yZE/xu3LJc8Ekm2+s4L0i4i+GjrPIr +AdXg65qX3Ama1Oa/8zvrH1Tlt/aBRmpcB0hbkNVPum4moJJfFbyQhvIQgvFxj3v6o06 qtsHsiNxjbCcDdiR+M72rftb+MKpHr3NDWsiPCGzI2NDGom2djqKvAgyzcPusDQk6X+D cM5h+SGwYNTgeEQ5H6F4030lcZFloJQroWUxa748tgUFUzSGoej5w3wyN7lAmDX/9h4w gkqY7Che/oqQa4SlPMOwMtwg4RzBS8dedHnZM0BJyuzs0A30qzyMSF0kK7mEc3XwOB35 +DDw== X-Gm-Message-State: AOAM530aRCWav94weH3f8jweAV3u/kRjunLrLUyE2Xr0ufiRNT0NXOno /hleQTByATtggMPN3beOdmtcbeiZ6tZx3IZO1xck/A== X-Google-Smtp-Source: ABdhPJy2Up0qaRmtX3q+ZWXdPVV/wYeOufGAyKI2iPQ8qrRHOYJ+f9H2vK2A0at1koieNXMiYThs4Y+9W5p70p5h2OA= X-Received: by 2002:a05:6512:2105:: with SMTP id q5mr596575lfr.649.1623364741775; Thu, 10 Jun 2021 15:39:01 -0700 (PDT) MIME-Version: 1.0 References: <20210610220527.366432-1-linus.walleij@linaro.org> In-Reply-To: From: Linus Walleij Date: Fri, 11 Jun 2021 00:38:50 +0200 Message-ID: Subject: Re: [PATCH v5] drm/panel: db7430: Add driver for Samsung DB7430 To: Doug Anderson Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Cercueil , Thierry Reding , Sam Ravnborg , dri-devel , =?UTF-8?Q?Noralf_Tr=C3=B8nnes?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Jun 11, 2021 at 12:30 AM Doug Anderson wrote: > > + mipi_dbi_command(dbi, MIPI_DCS_SET_ADDRESS_MODE, 0x0a); > > I would still prefer it if there was some type of error checking since > SPI commands can fail and could potentially fail silently. What about > at least this (untested): > > #define db7430_dbi_cmd(_db, _cmd, _seq...) \ > do { > int _ret = mipi_dbi_command(_db->dbi, _cmd, _seq); > if (_ret) > dev_warn(_db->dev, "DBI cmd %d failed (%d)\n", _cmd, _ret); > } while (0) > > Then at least you know _something_ will show up in the logs if there's > a transfer failure instead of silence? > > If you truly don't want the error checking then I guess I won't > insist, but it feels like the kind of thing that will bite someone > eventually... In any case, I'm happy to add this now (especially since > the DBI stuff is Acked now). This looks more like something that should be done in mipi_dbi_command() in include/drm/drm_mipi_dbi.h which claims: * Returns: * Zero on success, negative error code on failure. */ But no it does not return anything: #define mipi_dbi_command(dbi, cmd, seq...) \ ({ \ const u8 d[] = { seq }; \ mipi_dbi_command_stackbuf(dbi, cmd, d, ARRAY_SIZE(d)); \ }) I'll fix up the include and apply then we can think about what to do with mipi_dbi_command(). Yours, Linus Walleij