From patchwork Wed Sep 27 18:23:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 9975417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C532603F2 for ; Thu, 28 Sep 2017 07:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CBAD28470 for ; Thu, 28 Sep 2017 07:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81A7C294BB; Thu, 28 Sep 2017 07:30:15 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45C5A28470 for ; Thu, 28 Sep 2017 07:30:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 103546E871; Thu, 28 Sep 2017 07:30:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D1F36E160 for ; Wed, 27 Sep 2017 18:23:21 +0000 (UTC) Received: by mail-pf0-x243.google.com with SMTP id f84so7431778pfj.3 for ; Wed, 27 Sep 2017 11:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=ZxeBLEsSgRmDwV3m+riZNTqsg6QJWvSBo3EsY6cCF6w=; b=OAuAH/KAEjuZ1zHBwdOm7aHnEt60mla/41lJeSqVwbawn6wZpziQo9CWbLdp8pb5fl hZLVPyCs821ghd9SwhJ3pTbXTqFucQf0K+arY0LOO2mIXDpeFqMJIjBcrFOKOv+wxVqv FhOiWLk4GJJM45Isfw6q7utrkHPb8Yj3uWo62bFmytjVBjH6OlnOTW2MjdG9iqkN5dAd YYAG7+eCA0pJ02eUyyrzURxaD8EWH3ErmY2/uurjz3krBusLHLpV6NOlzP6GxFexqXFA VOM8AwHZWUoRaOsGF5zMLMi8hZcFDvWWog3gsAMQH54h5MW4Xd+3o0H7knJkyBHRxpxa WShg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ZxeBLEsSgRmDwV3m+riZNTqsg6QJWvSBo3EsY6cCF6w=; b=oQGIGC2TnIm1P0VOVfpwVKYNCXx87f2swTY+Z4sWUEaRzCY+MRwUTXTvOlE/YGc3hI 3HDkq3TpOOg9qtkp16sQY6QJlaqd6VJsUyvTfC8RX3BMRp1LuV43mn41MlQjjd70cAYg taf5Rp6VZ9vXRJgDGKyfMH6sPnP4bHpA+X0EbQwoYYv1lGUn/7ZZLg9nO5NptcVgBoEW MFPelq0g0q+ZKj7/k36vDCfj14eOKcrXLxnSJVCIDeDDVfXrQpRuJo/zalSvRVYOJkty ldmxPCGZVV0BjnEXJO2o5MYCzfP0ocqHadLHqO1GY/ixtu7wonTsBgCCiR8cS9JUD+kZ hSfw== X-Gm-Message-State: AHPjjUgTSx1STY30qP8QkXmUrRPa8T8a60nu7vt6cJyDr9da5LHQ1msC pUCNFcQRnRjQAML2SM17+xDjpYsc X-Google-Smtp-Source: AOwi7QD5L15uuBan2Xmp6VYwXlB/0pb4S84zDlA1xxAmIUGosRCeky+Opp2VWE7MvugOe1rqpqEbTg== X-Received: by 10.101.76.6 with SMTP id u6mr1300407pgq.93.1506536600592; Wed, 27 Sep 2017 11:23:20 -0700 (PDT) Received: from Haneen ([64.77.242.50]) by smtp.gmail.com with ESMTPSA id d23sm15810663pfe.115.2017.09.27.11.23.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Sep 2017 11:23:20 -0700 (PDT) Date: Wed, 27 Sep 2017 12:23:17 -0600 From: Haneen Mohammed To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/rockchip: Rely on the default best_encoder() behavior Message-ID: <20170927182317.GA8249@Haneen> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Thu, 28 Sep 2017 07:30:08 +0000 Cc: Daniel Vetter , outreachy-kernel , gregkh@linuxfoundation.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since the output has 1:1 relationship between connectors and encoders, and the driver is relying on the atomic helpers, remove the custom best_encoder() and let the core call drm_atomic_helper_best_encoder(). Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index a57da05..275844d 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -287,14 +287,6 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector) return ret; } -static struct drm_encoder * -cdn_dp_connector_best_encoder(struct drm_connector *connector) -{ - struct cdn_dp_device *dp = connector_to_dp(connector); - - return &dp->encoder; -} - static int cdn_dp_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode) { @@ -346,7 +338,6 @@ static int cdn_dp_connector_mode_valid(struct drm_connector *connector, static struct drm_connector_helper_funcs cdn_dp_connector_helper_funcs = { .get_modes = cdn_dp_connector_get_modes, - .best_encoder = cdn_dp_connector_best_encoder, .mode_valid = cdn_dp_connector_mode_valid, };