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=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 3A3C8C433E0 for ; Wed, 24 Jun 2020 07:27:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 070842073E for ; Wed, 24 Jun 2020 07:27:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gGa+26dD"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="h5QTW6Wp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 070842073E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qmLZzcHCRDbxR+FchsJcUXb6qZnf0/gSJ7kPwys0UZ0=; b=gGa+26dDRrmLKirtn/J+U+YU7 wVbiLSjt7o8KgRq24UMHjCaggKrQzSX3Wz9kRHr4PhVMgoLFxWW/EzWfMmExj0SB8rFCAWv2NrFMf 8BpToO6WYVBdS0RZHfRFqF5BEusliAhD4o7UuhUuhxIm4xz5TkvJPSL8UTUMYjpqBfirCKx4N44Ju AK9gusx3aW9TAfKl6p6fiMkyO/Iae1qh7g3s4MfHfZkTsKhWIRlTvLSfedgDir+miats3IaKGNvPX uifRDHXHJarpRDEUaQX3ftXuYsN3u33FJ0YCvOQkzq/Y80EHCTMIG5A0140jJeP2xraY6IxMGt6nn giHH0vTzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnzms-0003jy-E8; Wed, 24 Jun 2020 07:25:38 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnzmq-0003jC-Jb for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 07:25:37 +0000 Received: by mail-wr1-x444.google.com with SMTP id g18so1205737wrm.2 for ; Wed, 24 Jun 2020 00:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=59LdoHCMUE99a5VBVhHttZqJdAjYmBAszvOnaO6uxUc=; b=h5QTW6Wp1t7lOC6edzPr/1HV5Yt7vxI2e6KtCp5rxbAqbcYb1PMtX1j2MoTbpvxXKf oryGzpP9RgkplwQ56fsP14JtCKPV+MQXPKtiluIBqbQ6NS/OEQvGs1Vyp29Z84F1XhLn UuUAfzB6w0z4JAXx/LMK3ykNNZ/ntExAAqBSU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=59LdoHCMUE99a5VBVhHttZqJdAjYmBAszvOnaO6uxUc=; b=btYP0SKdu1xqBfHEkE1gGD/sUQpOEJUiU4wr7r0u/NmHN3XA2K6XBcTgYSheG38agj QkHUCHmtV+WSDPz90WtbQDWRPjdMCGq5+RdCM3lvYl7luz+Hxz72U55dcELRGoQaiy5V CXbyk4JrlIQ+Wt5FbWU/dUFx2eFlB9tX4ocNSPYS/pJ4C+9jGSVk8it7JAtGeyjxUwZy 2cqZ42ThvS3qKDJRpm8T5yfevED/UN6sIQSKnY/4VCSOL6u+B9kem9POiCE6ksylKoW2 w6YsooQ3dHfWrMwXjreqd8jQnY7CPyci/5DOGnM2UU15QNPP6qc/x4SFEpZ1S3tG0foo wLHA== X-Gm-Message-State: AOAM531CNq1UShbIAnp0KVWWhFWUgiJKYEeyX0ykJ7jOJfPyTnq+q373 x7sTQtYtZK1m9ouFrUgFGMWwrw== X-Google-Smtp-Source: ABdhPJwk5Ro7IJexQpMzboOlp8iEf2aJfM+12bWlMWIZNQf0/dNyRGAp+3rrz/1ODEs4xG9kyADLVw== X-Received: by 2002:adf:b6a4:: with SMTP id j36mr2009109wre.260.1592983533906; Wed, 24 Jun 2020 00:25:33 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id a81sm7361041wmd.25.2020.06.24.00.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 00:25:33 -0700 (PDT) Date: Wed, 24 Jun 2020 09:25:31 +0200 From: Daniel Vetter To: DRI Development Subject: Re: [PATCH 3/8] drm/imx: Use __drm_atomic_helper_crtc_reset Message-ID: <20200624072531.GU20149@phenom.ffwll.local> References: <20200612160056.2082681-1-daniel.vetter@ffwll.ch> <20200612160056.2082681-3-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200612160056.2082681-3-daniel.vetter@ffwll.ch> X-Operating-System: Linux phenom 5.6.0-1-amd64 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Pengutronix Kernel Team , Daniel Vetter , Intel Graphics Development , NXP Linux Team , Philipp Zabel , Daniel Vetter , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 12, 2020 at 06:00:51PM +0200, Daniel Vetter wrote: > Now also comes with the added benefit of doing a drm_crtc_vblank_off(), > which means vblank state isn't ill-defined and fail-y at driver load > before the first modeset on each crtc. > > Signed-off-by: Daniel Vetter > Cc: Philipp Zabel > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Pengutronix Kernel Team > Cc: Fabio Estevam > Cc: NXP Linux Team > Cc: linux-arm-kernel@lists.infradead.org Ping for some ack/review on this pls. Thanks, Daniel > --- > drivers/gpu/drm/imx/ipuv3-crtc.c | 21 ++++++++------------- > 1 file changed, 8 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c > index 63c0284f8b3c..02c2f848f2d1 100644 > --- a/drivers/gpu/drm/imx/ipuv3-crtc.c > +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c > @@ -109,20 +109,15 @@ static void imx_drm_crtc_reset(struct drm_crtc *crtc) > { > struct imx_crtc_state *state; > > - if (crtc->state) { > - if (crtc->state->mode_blob) > - drm_property_blob_put(crtc->state->mode_blob); > - > - state = to_imx_crtc_state(crtc->state); > - memset(state, 0, sizeof(*state)); > - } else { > - state = kzalloc(sizeof(*state), GFP_KERNEL); > - if (!state) > - return; > - crtc->state = &state->base; > - } > + if (crtc->state) > + __drm_atomic_helper_crtc_destroy_state(crtc->state); > > - state->base.crtc = crtc; > + kfree(to_imx_crtc_state(crtc->state)); > + crtc->state = NULL; > + > + state = kzalloc(sizeof(*state), GFP_KERNEL); > + if (state) > + __drm_atomic_helper_crtc_reset(crtc, &state->base); > } > > static struct drm_crtc_state *imx_drm_crtc_duplicate_state(struct drm_crtc *crtc) > -- > 2.26.2 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel