Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp144769ybi; Fri, 26 Jul 2019 07:27:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAtSmbSw9vnP7r9xXJyP+sr3QFJaUWj9CFse2ECju61wKSBVm26tseOl3XvtlX1qVayv2q X-Received: by 2002:a63:608c:: with SMTP id u134mr92183628pgb.274.1564151228740; Fri, 26 Jul 2019 07:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564151228; cv=none; d=google.com; s=arc-20160816; b=LneNrIKuQNfp4qFBWf/VwpqwHXS4Y8zYEn5/Uj72X/3USXG1teyrJNTSSza6usL7qg 8D5PW/+umuO6V8nN3CP0q95C172gyOqUTL10MHFzMcvzjjb/m9Dz08IZtal8e9KF3j6j Ggf0ERsQD1/yfVZEYzEtbevhqSjafRIIF1ymFeXIT2zGEkBDmO4CBlVvaYrGysyz91O9 aGuxJ6V4fWgASkroBN0fSJhG0WBW8qN2ZHGuEatbX9g1YdFpfJD95xfD6i/A9Jldpgfe 051LQAbbELwK2tUR3ZPF8Le3DKF4VUnUCofOhF6k55eviFc8HOucGY5wFsbDlEtOCvhy B/7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=hkUcOf0ydA+KKuluIvIb7Xy/IXTYqkk4lpoXnmpOp5Y=; b=FtLONbzj1pPL2p+ALXxEw0auojAITV1WXi9aHH6HQhoB0LOjRGZJo5wP5c3JLGaVuQ t2TmOIBHKdDot5jTyir7Rwfnm62dkapLGkFL+YQOn6WkBtu0wf3htcs/ilevp48ohkVI XcN+id3xCBLaf148XuT6ttMvWUn+tSgNNPSNw3fklZrM3Z+DKfjBeyIY8JLDkpCWuCWz e1JdiYbDC8RQFFZijCMGsy4Np1ZU9ymyXEjEMZLCMb3+4UgBAgmo74rJM9+XKv7jXrKc xdCTeQkIp3JauldpCdGOp8vPb0d5/Zno0MIZz6Cyo2hMwlkKh44eZUHWaTjkC6twzNTP 1Lmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=Rx0+UFWu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z61si18036237plb.19.2019.07.26.07.26.52; Fri, 26 Jul 2019 07:27:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=Rx0+UFWu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387513AbfGZOYC (ORCPT + 99 others); Fri, 26 Jul 2019 10:24:02 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42225 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726731AbfGZOYB (ORCPT ); Fri, 26 Jul 2019 10:24:01 -0400 Received: by mail-ed1-f66.google.com with SMTP id v15so53472284eds.9 for ; Fri, 26 Jul 2019 07:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=hkUcOf0ydA+KKuluIvIb7Xy/IXTYqkk4lpoXnmpOp5Y=; b=Rx0+UFWuP+pfapsIi/dvMT7L7ha7aPBlk89E7/oppXApi7d1NI5QPDUwlRlW5s5mSy q1aey0LXSoAVbe5Wdl5DaP2vIvyz7K/mChUaKxLP5VxrrhGA+qmOG+cwAPbV6Yiv87/N E0mFseeM77jST+wqYSm2ivuIsVjwLhqfsIuk0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=hkUcOf0ydA+KKuluIvIb7Xy/IXTYqkk4lpoXnmpOp5Y=; b=SOOfwo5JoJcrD+HwmQYajNiwpxtdnToTHidYFB5tOILXdP4t+IZlWVpWpQjp/HyvK1 Z3ajvzFppqGKi+0/hzpLYPkH8Z70SpZ6mCyExtQR8/hciQA7OFygaEcrXpliBlrk/XdM NMM9ZGnQQ/tgoV5KjMtGlVwcWjDv15FzMshgXgXq7VAhTmkUwdrdY/YZadU6ZhmL2Sbs Jt+pfXLjusCZUGenCUw3JhHp+IAGEcCtrsE5kQ3wAUKwrSrdfUncIFVByImPGRdzo5Bn pWbwsXWychLUBUPBDcfb5bt8GctF+fffdLNSvkHTQXV2qu48hSM6U7OXJpjf8rx0dJtD kjTQ== X-Gm-Message-State: APjAAAXIl6pp2Ey1q2DN1QFiKHCJCMc5Jf0vD5NqE5MbKsrJY5WFQuP4 NhxOnEBXUK2CQRPTZBFaZWc= X-Received: by 2002:a17:906:4894:: with SMTP id v20mr70646164ejq.120.1564151039742; Fri, 26 Jul 2019 07:23:59 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id w4sm10166343eja.34.2019.07.26.07.23.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 07:23:58 -0700 (PDT) Date: Fri, 26 Jul 2019 16:23:56 +0200 From: Daniel Vetter To: "Lowry Li (Arm Technology China)" Cc: Liviu Dudau , "james qian wang (Arm Technology China)" , "maarten.lankhorst@linux.intel.com" , "seanpaul@chromium.org" , "airlied@linux.ie" , Brian Starkey , Ayan Halder , "Jonathan Chai (Arm Technology China)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin (Arm Technology China)" , nd Subject: Re: [PATCH] drm/komeda: Skips the invalid writeback job Message-ID: <20190726142356.GI15868@phenom.ffwll.local> Mail-Followup-To: "Lowry Li (Arm Technology China)" , Liviu Dudau , "james qian wang (Arm Technology China)" , "maarten.lankhorst@linux.intel.com" , "seanpaul@chromium.org" , "airlied@linux.ie" , Brian Starkey , Ayan Halder , "Jonathan Chai (Arm Technology China)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin (Arm Technology China)" , nd References: <1564128758-23553-1-git-send-email-lowry.li@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564128758-23553-1-git-send-email-lowry.li@arm.com> X-Operating-System: Linux phenom 4.19.0-5-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 08:13:00AM +0000, Lowry Li (Arm Technology China) wrote: > Current DRM-CORE accepts the writeback_job with a empty fb, but that > is an invalid job for HW, so need to skip it when commit it to HW. > > Signed-off-by: Lowry Li (Arm Technology China) Hm, this sounds a bit like an oversight in core writeback code? Not sure how this can even happen, setting up a writeback job without an fb sounds a bit like a bug to me at least ... If we don't have a good reason for why other hw needs to accept this, then imo this needs to be rejected in shared code. For consistent behaviour across all writeback supporting drivers. -Daniel > --- > drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- > drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 9 ++++++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > index 2fed1f6..372e99a 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c > @@ -265,7 +265,7 @@ void komeda_crtc_handle_event(struct komeda_crtc *kcrtc, > komeda_pipeline_update(slave, old->state); > > conn_st = wb_conn ? wb_conn->base.base.state : NULL; > - if (conn_st && conn_st->writeback_job) > + if (conn_st && conn_st->writeback_job && conn_st->writeback_job->fb) > drm_writeback_queue_job(&wb_conn->base, conn_st); > > /* step 2: notify the HW to kickoff the update */ > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c > index 9787745..8e2ef63 100644 > --- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c > @@ -52,9 +52,16 @@ > struct komeda_data_flow_cfg dflow; > int err; > > - if (!writeback_job || !writeback_job->fb) > + if (!writeback_job) > return 0; > > + if (!writeback_job->fb) { > + if (writeback_job->out_fence) > + DRM_DEBUG_ATOMIC("Out fence required on a invalid writeback job.\n"); > + > + return writeback_job->out_fence ? -EINVAL : 0; > + } > + > if (!crtc_st->active) { > DRM_DEBUG_ATOMIC("Cannot write the composition result out on a inactive CRTC.\n"); > return -EINVAL; > -- > 1.9.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch