Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3342789imm; Tue, 17 Jul 2018 03:14:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpctDM+ClNUbZGVFyaOSF+Xwg0Fgh69c7iSz5+nph8IHUK2GSVTLiUfWXlsUpHwGKX5j4iXl X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr38755pfj.9.1531822478004; Tue, 17 Jul 2018 03:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531822477; cv=none; d=google.com; s=arc-20160816; b=Ub0gOsftHfPYnxt0TrPDtHyFnsLQU7Zna5uSy5qX63TFWZOTxDjvd7RyGilEOntkMQ p60jZ4iRSd8C9VE+iyreqn79dIEMhVigZhzC5SNyqhCRAPQZwcUQ/tY8UIFDfDNSmcNR +DT0NhZBqrI0zdKyL66Dd4I6jaKvhgaViZikLMDM/svh5EY8+CzcwS8TAJctWQiVkjHx P8Q8/5Lquh+7F/FSxRzKtembSphUFDXWjMkp0B7z9p6fR8/juUtZ+MAEednTUC18iqY6 bF+aGZvqRNmWUz6ldcEX0UKyUpnIKTG3x7S0wsX8OmmTSCxZXX82LxNdxkZ3xkzuywLr 7fRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=dE+XDxdSC/f021lj0P0Gu+LhU4Di4/8WmE9CQmSzMyE=; b=hhx3hcNcy8HSmZXFsG+A4CbOsrkQKqwHCu/ClFgm8XP1us1ygsVOSolZk75Blo31DX /bUCR61skafuuMOhkFaKmiIuIGkLAKbWbfh+KcOPL9q5VDp2bmhKItz4rq6q+lhyM25M lUJZm8wxaVxaJ58veesxDj139y7zB84+iHm6vDgQ1iRuHeH5qn06u0ckYcKhwRgdYmqO l8vCAzwR3yCK9bTl4Tf0C2HbUfjBCMQR63gJFzMTLGkPtZZaQ4pnLV2IACv1HN/RR0j6 ddGelEbHMn4bndyeQJ/KgTCgTJkdWOFny2x6aHCq5002+eMvH8frMRTI3XGpStF3+5J1 GY1A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si487308pld.424.2018.07.17.03.14.23; Tue, 17 Jul 2018 03:14:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729980AbeGQKoL (ORCPT + 99 others); Tue, 17 Jul 2018 06:44:11 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:35586 "EHLO mail-wr1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729712AbeGQKoL (ORCPT ); Tue, 17 Jul 2018 06:44:11 -0400 Received: by mail-wr1-f41.google.com with SMTP id a3-v6so665838wrt.2 for ; Tue, 17 Jul 2018 03:12:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dE+XDxdSC/f021lj0P0Gu+LhU4Di4/8WmE9CQmSzMyE=; b=FysQYIseuK4LH7MChrHfV79jLXzTQWVfgjFn3AyquM99egBa3oriXDL54bZnFHPZah YVSgACm4Ex0c3LZWb9pJOIssq9zKFLlgRvXV+nxwhvKBKA6ckw1JrS44mNJvDQXiapoX 9nWyW6oSaurGSxfsEFSa6itighV8cNQM99fxDkpCoKNTluLBy5DbUqQvfjjCafNy8zmC /1I+Ud9uAoFBWD2bdM2IYuMWkqG772xmrxumGUjtcJc+/VxNP1ZlKWp7vgdj+NvTsGYY kyOQ47l/RXUUwQigl1kzUSNNRzXcm3v1iAvmL/i2p1wigQtfP2NsbCJafIts0/QsIIeQ FqQg== X-Gm-Message-State: AOUpUlEO5f3o7mkRu/fqi7FDGBiWDSdUkLg8BsnAgdKcvVTjQd9pt2q3 rl5gTcsQNYYE1rOuTGpq9j/ivprzInp3wWwZgbV+wQ== X-Received: by 2002:adf:dc8e:: with SMTP id r14-v6mr870041wrj.166.1531822338540; Tue, 17 Jul 2018 03:12:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:28c2:0:0:0:0:0 with HTTP; Tue, 17 Jul 2018 03:12:18 -0700 (PDT) In-Reply-To: <20180717072152.GA16115@wunner.de> References: <20180716235936.11268-1-lyude@redhat.com> <20180716235936.11268-3-lyude@redhat.com> <20180717072152.GA16115@wunner.de> From: Karol Herbst Date: Tue, 17 Jul 2018 12:12:18 +0200 Message-ID: Subject: Re: [Nouveau] [PATCH 2/5] drm/nouveau: Grab RPM ref while probing outputs To: Lukas Wunner Cc: Lyude Paul , David Airlie , nouveau , Maarten Lankhorst , LKML , dri-devel , Ben Skeggs , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Karol Herbst On Tue, Jul 17, 2018 at 9:21 AM, Lukas Wunner wrote: > 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 > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau