From patchwork Wed Jul 31 00:23:53 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: 2835998 Return-Path: X-Original-To: patchwork-intel-gfx@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 76ECEC0319 for ; Wed, 31 Jul 2013 00:26:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9911220260 for ; Wed, 31 Jul 2013 00:26:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ADF7E2025B for ; Wed, 31 Jul 2013 00:26:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 95B30E6241 for ; Tue, 30 Jul 2013 17:26:06 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by gabe.freedesktop.org (Postfix) with ESMTP id B44CCE5EC0 for ; Tue, 30 Jul 2013 17:25:01 -0700 (PDT) Received: by mail-pb0-f52.google.com with SMTP id wz12so74535pbc.11 for ; Tue, 30 Jul 2013 17:25:01 -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:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=kLtyo/QvEzSJgNawgzP1cTsZxk4pbzIpXMBXGpEBJQE=; b=bu3O48xmh/mSGnTeGkG1HxcMw9oDNeIkwCkbF1lvuhIsfF+Dd6sDa04al0EBD/KgYk I9VVlKfmZV1tO+BZkqDzY2Kpw5n5Ha8PECL+Ezu4cUxgwafFf6UgTiKcv7Ir35q/9rCr mxsEMCoK49FY05VnqgF6EYcOPfOarRQOSooIQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=kLtyo/QvEzSJgNawgzP1cTsZxk4pbzIpXMBXGpEBJQE=; b=B8WxXZD5Fu1A9IEjm+YTNHfUuKj/ITxdbObPZ7dR3B+jZ7tVJmctDQLmti1Itkublz qd1y1rvGVn0X7hIiLEB5yzNmnjiMZXXU4xsTxhtrO4lOSM1yX7dbIeq+9l9qD5dG+DDu 37/uj5YmocbFEtjzglPX3LeE1QKrs9O0LOhk5BYg1Q1CR3fIoU55eNoaWZQRa+YUd4TN 8NPnrIdBKZ9vGSufzA7igTgLzFEZeU6B0PhOBEy6x3mnuXLHVgxWrMemCvsseWRGf7u7 BFyK38vcp1iYjFUMcw0TTtVy0IVjCeIzQUw6ePyMf7zHumGYLaln1Q3cSAFXbAcldcEA 874Q== X-Received: by 10.68.103.131 with SMTP id fw3mr76312957pbb.65.1375230301597; Tue, 30 Jul 2013 17:25:01 -0700 (PDT) Received: from localhost ([2620:0:1000:1b01:82c1:6eff:fef8:b068]) by mx.google.com with ESMTPSA id kd1sm724610pab.20.2013.07.30.17.24.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jul 2013 17:25:00 -0700 (PDT) From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= To: dri-devel@lists.freedesktop.org Date: Tue, 30 Jul 2013 17:23:53 -0700 Message-Id: <1375230233-4256-3-git-send-email-marcheu@chromium.org> X-Mailer: git-send-email 1.8.3 In-Reply-To: <1375230233-4256-1-git-send-email-marcheu@chromium.org> References: <1375230233-4256-1-git-send-email-marcheu@chromium.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkT6R3CQY7P51EoVTSj9tra9EjahQ9XiS/s6/QmePAmHUp/hKdOfBP8F1QDOUiqs4VmkL4B Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 3/3] drm: Remove drm_mode_validate_clocks X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 Signed-off-by: Stéphane Marchesin --- 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);