From patchwork Tue Aug 13 18:55:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?St=C3=A9phane_Marchesin?= X-Patchwork-Id: 2844209 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3AB23BF546 for ; Wed, 14 Aug 2013 07:16:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0979A20395 for ; Wed, 14 Aug 2013 07:16:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0CD9D2038C for ; Wed, 14 Aug 2013 07:16:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EBF1DE6039 for ; Wed, 14 Aug 2013 00:16:49 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ECDFE5F99 for ; Tue, 13 Aug 2013 11:55:17 -0700 (PDT) Received: by mail-pd0-f178.google.com with SMTP id w10so5246872pde.23 for ; Tue, 13 Aug 2013 11:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=UbeiWmbZ/2UGmJl5NSc1RzQv0tPpWBAdFmSU9nAm7Jc=; b=dHNDuLCYVXt7ZVIVqut/wW4wIchOeqgTFHJh4fVP+0URRuqFCyxUctDs0V9uZQXgiT SmuC1Q1WduAw0igIpJ09YwEZKCa6/usLcNxvXPsz8ehjDNFunQOIgmTyqZmU5iQSDjtR 5bIcf4Qc/YtRGACYlhqsXwDIRZgUMbZdjB780= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=UbeiWmbZ/2UGmJl5NSc1RzQv0tPpWBAdFmSU9nAm7Jc=; b=cLRoWxhSlQ+IJYNDwgGcLg8PYfMWaBOZ3zUCHEdT01yOrHuGNxc20kDnfQqfVc5o/y QilyM+GiGVsyGFXfUANdHKuzSTYTsjPtjbN2j66Y53stISFwRp754o32zpb4DQP5PMqR h1D2fDc7qA46UGnToV7l4FX6CY39+xqGqzuuA2XMfexD6d8kd3xPaVVKDBnNSlUHZ6Zh aXPpSWX6nNN9DwSXir4IxspMGYg58itQmlbYT/94JeoV9Yt8cc9KP8ZfgKVeD8kjp4B/ iaWk5upmpr/hwARQhHIT1tvzIpcCbngLEhnSVmuAArgs/RPY96d2KsCgqV7HQRSqFjA9 X/Ow== X-Gm-Message-State: ALoCoQkm4qN/aJg2twFj/79lOAdjOd4Sn5zccyTUxAFOkezsmVLxfERJARvEuFTxmgu4bd98GxYl X-Received: by 10.68.242.105 with SMTP id wp9mr5893287pbc.153.1376420116808; Tue, 13 Aug 2013 11:55:16 -0700 (PDT) Received: from localhost ([2620:0:1000:1b01:82c1:6eff:fef8:b068]) by mx.google.com with ESMTPSA id t9sm45384615pba.46.2013.08.13.11.55.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 13 Aug 2013 11:55:15 -0700 (PDT) From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm: Remove drm_mode_validate_clocks Date: Tue, 13 Aug 2013 11:55:12 -0700 Message-Id: <1376420112-3033-1-git-send-email-marcheu@chromium.org> X-Mailer: git-send-email 1.8.3 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 13 Aug 2013 22:41:27 -0700 Cc: airlied@redhat.com, =?UTF-8?q?St=C3=A9phane=20Marchesin?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This function is unused. Signed-off-by: Stéphane Marchesin Reviewed-by: David Herrmann --- drivers/gpu/drm/drm_modes.c | 37 ------------------------------------- include/drm/drm_crtc.h | 3 --- 2 files changed, 40 deletions(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index a6729bf..504a602 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -923,43 +923,6 @@ void drm_mode_validate_size(struct drm_device *dev, EXPORT_SYMBOL(drm_mode_validate_size); /** - * drm_mode_validate_clocks - validate modes against clock limits - * @dev: DRM device - * @mode_list: list of modes to check - * @min: minimum clock rate array - * @max: maximum clock rate array - * @n_ranges: number of clock ranges (size of arrays) - * - * LOCKING: - * Caller must hold a lock protecting @mode_list. - * - * Some code may need to check a mode list against the clock limits of the - * device in question. This function walks the mode list, testing to make - * sure each mode falls within a given range (defined by @min and @max - * arrays) and sets @mode->status as needed. - */ -void drm_mode_validate_clocks(struct drm_device *dev, - struct list_head *mode_list, - int *min, int *max, int n_ranges) -{ - struct drm_display_mode *mode; - int i; - - list_for_each_entry(mode, mode_list, head) { - bool good = false; - for (i = 0; i < n_ranges; i++) { - if (mode->clock >= min[i] && mode->clock <= max[i]) { - good = true; - break; - } - } - if (!good) - mode->status = MODE_CLOCK_RANGE; - } -} -EXPORT_SYMBOL(drm_mode_validate_clocks); - -/** * drm_mode_prune_invalid - remove invalid modes from mode list * @dev: DRM device * @mode_list: list of modes to check diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index fa12a2f..32e0820 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -930,9 +930,6 @@ extern void drm_mode_list_concat(struct list_head *head, extern void drm_mode_validate_size(struct drm_device *dev, struct list_head *mode_list, int maxX, int maxY, int maxPitch); -extern void drm_mode_validate_clocks(struct drm_device *dev, - struct list_head *mode_list, - int *min, int *max, int n_ranges); extern void drm_mode_prune_invalid(struct drm_device *dev, struct list_head *mode_list, bool verbose); extern void drm_mode_sort(struct list_head *mode_list);