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=-8.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 9B106C04AAF for ; Thu, 16 May 2019 11:34:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E42F20848 for ; Thu, 16 May 2019 11:34:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZHYxJrJr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbfEPLew (ORCPT ); Thu, 16 May 2019 07:34:52 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:34372 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbfEPLev (ORCPT ); Thu, 16 May 2019 07:34:51 -0400 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D16F2FD; Thu, 16 May 2019 13:34:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1558006489; bh=tD6pYcvyI1ppPO9NRGcc+yvujI/ioWR4xT1ttbnpils=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZHYxJrJrY6rhdctIDEsnmjHlabRm6si1l8zIAeSlZOV+yYVnkf6HVAvPz7t2mWg2k 546y2KUpPhEwyMB8mJ+56qJty2Y6/FpDFHUHYux+WGZGRLcAIZPLomKpMXA5mQF8gC VJKcW5vrUyp/rL07VoAgM49CXgDUI8JTxnlvn0XQ= Date: Thu, 16 May 2019 14:34:33 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Cc: Niklas =?utf-8?Q?S=C3=B6derlund?= , Ulrich Hecht , Linux Media Mailing List , Linux-Renesas , Ulrich Hecht Subject: Re: [PATCH v2 2/8] rcar-vin: Remove unneeded calls to pm_runtime_{enable,disable} Message-ID: <20190516113433.GC14820@pendragon.ideasonboard.com> References: <20190516011417.10590-1-niklas.soderlund+renesas@ragnatech.se> <20190516011417.10590-3-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Thu, May 16, 2019 at 09:27:03AM +0200, Geert Uytterhoeven wrote: > On Thu, May 16, 2019 at 3:49 AM Niklas Söderlund wrote: > > Runtime PM is already enabled unconditionally when the driver is probed > > and disabled when it's removed. There is no point in doing it again for > > Gen2 when opening and closing the video device. > > > > Signed-off-by: Niklas Söderlund > > Reviewed-by: Ulrich Hecht > > --- > > drivers/media/platform/rcar-vin/rcar-v4l2.c | 7 +------ > > 1 file changed, 1 insertion(+), 6 deletions(-) > > > > diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c > > index b821ea01786eb1ff..0841f1a0bfd7ba3a 100644 > > --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c > > +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c > > @@ -797,8 +797,6 @@ static int rvin_initialize_device(struct file *file) > > if (ret < 0) > > return ret; > > > > - pm_runtime_enable(&vin->vdev.dev); > > Ah, this already (partly) answers my question on patch 1/8. Note that those are two different devices, here we enable runtime PM in the V4L2 video node class device, while at probe time we enable it on the platform device. I agree that this call should go, but that's only because all runtime PM calls on the class device should go :-) > > > - > > /* > > * Try to configure with default parameters. Notice: this is the > > * very first open, so, we cannot race against other calls, -- Regards, Laurent Pinchart