Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3205563imm; Tue, 17 Jul 2018 00:22:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpctusI1K3PsbaK36D3T3iau/nlkwtCbiTzNLHTIKcJcbrcFTLrukZoeR70Fg66JaurzvN2C X-Received: by 2002:a17:902:bcc5:: with SMTP id o5-v6mr497750pls.336.1531812173994; Tue, 17 Jul 2018 00:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531812173; cv=none; d=google.com; s=arc-20160816; b=jPL60tIC3PqTu8drG511egdHZVRQHA9vVrSiowQNr380J7gLEcSI9k+qy28hTYCc6X N+lzl83iOvIrpONsEuW4qeRk7CUeBHYbREps3WeEKPciQAON2NmHga7ApLpmWNGLx7EZ 0LIYdMD7GkrWALSJYz37AIrOuFskB4t+SvC9/GzH4+tLU9JyXL51F5C4oElpYQsULU2r Z5FWwEhbkuA6HpOkr6esE7eyiPis8DWSPNU84HiPEXkWisfrexzf4Wr+gUXK5eNeRVzC Gj+kQKWAoOxDs3HC/0nDQWl84e+aZyTfBflLZy3/aAyvLWIlRRQi6vcWKDq+hcYQ4+li pAtw== 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:message-id:subject:cc :to:from:date:arc-authentication-results; bh=S8gsBFTS6nyT5J6NeyHECO3VsZd1NGenR0431CZMza8=; b=PZxwSPgCfZTG+86wNmwEQ/IOpmIM7b/j4jc+K8N8f3p6fjB1TTlm50vSXR7KZLUvyX UFSVt/kJKMDuBuBMfr7t7igSOdxk6jUyPrX56I/Dvk61b2jP4FCZsMMuXX7KpZOl+P4v fAem/qtx39H2K7emFZsy0pgXyWReka6wGghcn+l4viHHRe+BftsOHA8hv+KAaJQ+lvNW g2zpYv0nas0UAqWpvheaUxEQvMvmfG/77tfUQCm+cKuHYEKgU7ZT5Ojv0V4PZvNqpNps WOHrGvWzYEnm0l7v3RLv+sSgm/hg8hvhGGaOUndnYZMAVQqbmMm6zceuSfOE78xXEcB8 RZIA== ARC-Authentication-Results: i=1; mx.google.com; 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 o5-v6si240335plk.25.2018.07.17.00.22.39; Tue, 17 Jul 2018 00:22:53 -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; 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 S1729035AbeGQHxF (ORCPT + 99 others); Tue, 17 Jul 2018 03:53:05 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:34871 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbeGQHxF (ORCPT ); Tue, 17 Jul 2018 03:53:05 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 449BA2801FAD2; Tue, 17 Jul 2018 09:21:53 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DB85822684B; Tue, 17 Jul 2018 09:21:52 +0200 (CEST) Date: Tue, 17 Jul 2018 09:21:52 +0200 From: Lukas Wunner To: Lyude Paul Cc: nouveau@lists.freedesktop.org, David Airlie , dri-devel@lists.freedesktop.org, Maarten Lankhorst , linux-kernel@vger.kernel.org, Ben Skeggs , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [Nouveau] [PATCH 2/5] drm/nouveau: Grab RPM ref while probing outputs Message-ID: <20180717072152.GA16115@wunner.de> References: <20180716235936.11268-1-lyude@redhat.com> <20180716235936.11268-3-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180716235936.11268-3-lyude@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 16, 2018 at 07:59:26PM -0400, Lyude Paul wrote: > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -2012,10 +2012,18 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev) > return &atom->state; > } > > +static void > +nouveau_output_poll_changed(struct drm_device *dev) > +{ > + pm_runtime_get_sync(dev->dev); > + drm_fb_helper_hotplug_event(dev->fb_helper); > + pm_runtime_put_autosuspend(dev->dev); > +} > + > static const struct drm_mode_config_funcs > nv50_disp_func = { > .fb_create = nouveau_user_framebuffer_create, > - .output_poll_changed = drm_fb_helper_output_poll_changed, > + .output_poll_changed = nouveau_output_poll_changed, It might make sense to provide a generic DRM helper for this. Same for patch 3 in this series. Thanks, Lukas