From patchwork Mon Feb 25 13:20:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10828553 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53A071399 for ; Mon, 25 Feb 2019 13:20:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 417852B60B for ; Mon, 25 Feb 2019 13:20:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 350562B65B; Mon, 25 Feb 2019 13:20:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4CA72B633 for ; Mon, 25 Feb 2019 13:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbfBYNUm (ORCPT ); Mon, 25 Feb 2019 08:20:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45756 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbfBYNUm (ORCPT ); Mon, 25 Feb 2019 08:20:42 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5FC6300DA3B; Mon, 25 Feb 2019 13:20:41 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-117-17.ams2.redhat.com [10.36.117.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE00C60857; Mon, 25 Feb 2019 13:20:38 +0000 (UTC) From: Hans de Goede To: Maarten Lankhorst , Maxime Ripard , Sean Paul , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Greg Kroah-Hartman , Heikki Krogerus Cc: Hans de Goede , David Airlie , intel-gfx , dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org Subject: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers Date: Mon, 25 Feb 2019 14:20:34 +0100 Message-Id: <20190225132037.31458-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 25 Feb 2019 13:20:42 +0000 (UTC) Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, On some Cherry Trail devices, DisplayPort over Type-C is supported through a USB-PD microcontroller (e.g. a fusb302) + a mux to switch the superspeed datalines between USB-3 and DP (e.g. a pi3usb30532). The kernel in this case does the PD/alt-mode negotiation itself, rather then everything being handled in firmware. So the kernel itself picks an alt-mode, tells the Type-C "dongle" to switch to DP mode and sets the mux accordingly. In this setup the HPD pin is not connected, so the i915 driver needs to respond to a software event and scan the DP port for changes manually. Thanks to Heikki's great work on the DisplayPort altmode support in the typec subsys, we now correctly tell the dongle to switch to DP altmode and we correctly set the mux and orientation switches to connect the DP lines to the Type-C connector. This just leaves sending an out-of-band hotplug event from the Type-C subsystem to the i915 driver and then we've fully working DP over Type-C on these devices. This series implements this. The first patch adds a generic mechanism for oob hotplug events to be send to the drm subsys, the second patch adds support for this mechanism to the i915 driver and the third patch makes the typec displayport_altmode driver send these events. The commit message of the first patch explains why I've chosen to things the way these patches do them. Regards, Hans