From patchwork Tue Feb 14 19:25:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 93971 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1708289qgi; Tue, 14 Feb 2017 11:25:07 -0800 (PST) X-Received: by 10.157.7.6 with SMTP id 6mr18981395ote.194.1487100307490; Tue, 14 Feb 2017 11:25:07 -0800 (PST) Return-Path: Received: from mail-ot0-x230.google.com (mail-ot0-x230.google.com. [2607:f8b0:4003:c0f::230]) by mx.google.com with ESMTPS id p2si688602oic.238.2017.02.14.11.25.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 11:25:07 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:4003:c0f::230 as permitted sender) client-ip=2607:f8b0:4003:c0f::230; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:4003:c0f::230 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-ot0-x230.google.com with SMTP id 73so101918183otj.0 for ; Tue, 14 Feb 2017 11:25:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=8/PxpOWbpiabMUkJkZ1bCOW1f1a0W8KdogtK2rT5MI4=; b=Tx1u8y8x0uiudvYyq+Hcl1wNRD2mlstI9zhOhZpJlJ3C46m2T8TFTxpaKLBy0WTWPm ZVhKmvs5UJdT8U1ghWtPN5QvYLxHAdycKjnm2VMD26ee5pc1dje1v8klIphsH0e6u2hd wsIP93aCB32y/PVfobhB3hREz4drWsRW2VVUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8/PxpOWbpiabMUkJkZ1bCOW1f1a0W8KdogtK2rT5MI4=; b=GzQ3FobGi/7c8N5VwVwcAno9iYibTkjoa7Z2yRhFB83mxQM//zFMTU0iMRM2eI1weZ JMHin3QKapezrTay70M/vmsviLOqiwcWxsGv+rXuXDqt/Flbu3ChYO7zzMbe+Z2OoG1p ObtYoB8674Pv8DqfdFMCeV9UtzlvTl4TQQ024W2m2Bg+WNf7paKwp8p6YLg/5bUQxFnD bpYE92ywGODBkhqzcUeT9/HWLyteR73/pVTTw3sybD1sTXa9HHpS9t9nwG67TgOX7gCF vbfbtwHD+7TzqpeliQIPVonWttUSm3G2mFgid1Tasi88W0eOyaDTh1TEJ6Fl6WB6JfPG Td6g== X-Gm-Message-State: AMke39mzGKUthwXAxHy5vhgSK2IUwQthtrNUdSBKlTlCeG2U8HJT/6WCp9ABrT0EU0bwQuqvBvM= X-Received: by 10.98.66.82 with SMTP id p79mr33326020pfa.10.1487100307156; Tue, 14 Feb 2017 11:25:07 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id t6sm2825378pgt.8.2017.02.14.11.25.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Feb 2017 11:25:05 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Daniel Vetter , Jani Nikula , Sean Paul , David Airlie , Rob Clark , Xinliang Liu , Xinliang Liu , Rongrong Zou , Xinwei Kong , Chen Feng , Archit Taneja , dri-devel@lists.freedesktop.org Subject: [RFC][PATCH 0/2] Add mode_valid drm_crtc_helper_funcs for HiKey Date: Tue, 14 Feb 2017 11:25:00 -0800 Message-Id: <1487100302-9445-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 Currently, on the hikey board, we have the adv7511 bridge wired up to the kirin ade drm driver. Unfortunately, the kirin ade core cannot generate accurate byteclocks for all pixel clock values. Thus if a mode clock is selected that we cannot calculate a matching byteclock, the device will boot with a blank screen. Unfortunately, currently the only place we can properly check potential modes for this issue in the connector mode_valid helper. Again, hikey uses the adv7511 bridge, which is shared between a number of different devices, so its improper to put restrictions caused by the kirin drm driver in the adv7511 logic. So this patch set tries to fix this by adding some infrastructure and logic to the probe helpers so that drm_crtcs can filter the probed modes. And then adds a whitelist of valid modes for the kirin drm driver used on HiKey. This is a first pass attempt here, implementing a suggestion from Rob Clark on irc, so I'd really welcome any feedback or ideas for how to best do this. Thanks so much! -john Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: Rob Clark Cc: Xinliang Liu Cc: Xinliang Liu Cc: Rongrong Zou Cc: Xinwei Kong Cc: Chen Feng Cc: Archit Taneja Cc: dri-devel@lists.freedesktop.org John Stultz (2): drm/probe-helper: Add mode_valid check to drm_crtc_helper_funcs drm: kirin: Restrict modes to known good mode clocks drivers/gpu/drm/drm_probe_helper.c | 24 ++++++++++++++++ drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 38 +++++++++++++++++++++++++ include/drm/drm_modeset_helper_vtables.h | 26 +++++++++++++++++ 3 files changed, 88 insertions(+) -- 2.7.4