From patchwork Wed Sep 5 15:22:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10589015 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 68511112B for ; Wed, 5 Sep 2018 15:23:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F5F7296BE for ; Wed, 5 Sep 2018 15:23:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423F829E3C; Wed, 5 Sep 2018 15:23:18 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 DA8AA296BE for ; Wed, 5 Sep 2018 15:23:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 538496E4E9; Wed, 5 Sep 2018 15:23:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id C85CC6E4E9 for ; Wed, 5 Sep 2018 15:23:15 +0000 (UTC) Received: by mail-ed1-x544.google.com with SMTP id z27-v6so6399156edb.10 for ; Wed, 05 Sep 2018 08:23:15 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=qdRllxZC17oKCdMKn77qNc7U5BseBXMyzPI9o80s8aE=; b=ML+ze2NGmT0GRVAsRhSyQQHxX20Qq5uGXTEHlcqNJuOj3m5FCqE3EVYEgPQD94zSOM gl5MTPLqAPADoOqLVAJtUSe8Z2t6zg3aQzdIoJbh0DDB5yqkTcmYbGL67lxok1nMuxke 4LPdzyhYWU7H7NhkuyGVfvrVz0MSYnQp5chhmK6UIynqA5IAmKini89r6FD4QvhWBwDD xfs1Mu8rix19QV3qRDp396d4X9uNPL1Yca1tOS7JuPZxj0Qvk9xg8uoQOBAdVbiTrBPa E201tmcGDY80aWqFaALtQOSE8o5DyZWdPncUcqOfN0JVUtPU/gA7exwzmfihsQhJWp+L 3XSA== X-Gm-Message-State: APzg51AqfYiM6CKfSHB0KiahElHlbHMcntL7jRD5ekIAREPrMx8KIH8u 9fZx82LUT+yhge/Z2ZiqL8ACzQ== X-Google-Smtp-Source: ANB0VdaZfzW0dVABigGxSELtxrEKHejWBVhAn+XZD7BgV+ltnGQnNwj4IE9NFtUefjtWHI97RePvoQ== X-Received: by 2002:a50:9943:: with SMTP id l3-v6mr43645161edb.198.1536160994507; Wed, 05 Sep 2018 08:23:14 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id d11-v6sm2394228edo.39.2018.09.05.08.23.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 08:23:13 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Wed, 5 Sep 2018 17:22:30 +0200 Message-Id: <20180905152229.19281-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.19.0.rc1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/amdgpu: Remove default best_encoder hook from DC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Grodzovsky , "Leo \(Sunpeng\) Li" , Daniel Vetter , Intel Graphics Development , Shirish S , Tony Cheng , Alex Deucher , Daniel Vetter , Harry Wentland Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP For atomic driver this is the default, no need to reimplement it. We still need to keep the copypasta for not-atomic drivers though, since no one polished the legacy crtc helpers as much as the atomic ones. Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: Harry Wentland Cc: Andrey Grodzovsky Cc: Tony Cheng Cc: "Leo (Sunpeng) Li" Cc: Shirish S --- Stand-alone submission because our CI says this kills kbl-g somewhere in the amdgpu.ko load path, and I just don't see why. -Daniel --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index af6adffba788..333f9904f135 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2794,28 +2794,6 @@ static const struct drm_connector_funcs amdgpu_dm_connector_funcs = { .atomic_get_property = amdgpu_dm_connector_atomic_get_property }; -static struct drm_encoder *best_encoder(struct drm_connector *connector) -{ - int enc_id = connector->encoder_ids[0]; - struct drm_mode_object *obj; - struct drm_encoder *encoder; - - DRM_DEBUG_DRIVER("Finding the best encoder\n"); - - /* pick the encoder ids */ - if (enc_id) { - obj = drm_mode_object_find(connector->dev, NULL, enc_id, DRM_MODE_OBJECT_ENCODER); - if (!obj) { - DRM_ERROR("Couldn't find a matching encoder for our connector\n"); - return NULL; - } - encoder = obj_to_encoder(obj); - return encoder; - } - DRM_ERROR("No encoder id\n"); - return NULL; -} - static int get_modes(struct drm_connector *connector) { return amdgpu_dm_connector_get_modes(connector); @@ -2934,7 +2912,6 @@ amdgpu_dm_connector_helper_funcs = { */ .get_modes = get_modes, .mode_valid = amdgpu_dm_connector_mode_valid, - .best_encoder = best_encoder }; static void dm_crtc_helper_disable(struct drm_crtc *crtc)