From patchwork Wed Dec 12 13:06:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1866041 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 4303BDF2EE for ; Wed, 12 Dec 2012 13:26:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34DD5E657A for ; Wed, 12 Dec 2012 05:26:14 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 13FBFE5EAA for ; Wed, 12 Dec 2012 05:07:31 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so424128eek.36 for ; Wed, 12 Dec 2012 05:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=OqMpAngzqDknqR3vwJRnqZHAW9/OeLk8wPZ9JjuS0G4=; b=J/mKs1dkZnhqJ4nU8QI7FXHiY6DP5y96FfT7qf4pWqr0FgbiFi6lUT0POi+jHOPbQx Uwi+UtjE5qXlv8W864GEziBvab/d05x4v92THPzWB/xMugVIh3fkWd0yLI7sWexJF/Pw aVyzB6aT2r0tEhgh+Z1l/39XgPGmwuVaqqrpc= 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 :x-gm-message-state; bh=OqMpAngzqDknqR3vwJRnqZHAW9/OeLk8wPZ9JjuS0G4=; b=pwbRfVm6N+pDEIrQUcoHZq5n82hQKCFvEqKGCZL+i9y7mcQ+U4grn5w9nIi7lRK0go /D1bMUsdI27lFrc95c7Xo8VHl2oWQmBC1F+J4hPon+RvstQNlH9CCAbvslUV8Yl647v2 8x3pfgqMDm20iV59vrvVGHqzlDNEQS/IzL6VuGflrR9KCz2JwgyNkqekLjLgL4IOc8VJ JnQXVzYO3/iJS43ZY15B4x1d762ENVoMsYduQvSNNJZZ6Dd6C56+3jNi+PesJ66ujPW2 VX9TDKe475Rc0/fTJTBwgxYzeaXLqWDjOEOkES6WTjZHXWTdLLwqoXKRx5uV+6lUQov5 dw9Q== Received: by 10.14.215.194 with SMTP id e42mr2713101eep.32.1355317651025; Wed, 12 Dec 2012 05:07:31 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id r1sm55868541eeo.2.2012.12.12.05.07.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 05:07:30 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 06/37] drm/gma500: use drm_modeset_lock_all Date: Wed, 12 Dec 2012 14:06:46 +0100 Message-Id: <1355317637-16742-7-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> References: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQl0n2c8ZKrmTsZGjLdFI1E2igBvJ7OKaUTADjFUOv3F+VV7ARJLJll+PhgKP6IoJX7TktQ6 Cc: Nouveau Dev , Intel Graphics Development , Radeon Dev , Daniel Vetter 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: , MIME-Version: 1.0 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 Only two places: - suspend/resume - Some really strange mode validation tool with too much funny-lucking hand-rolled conversion code. Better safe than sorry, so convert both places to keep the locking semantics as much as possible. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/gma500/psb_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index dd1fbfa..2bf0c92 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -476,7 +476,7 @@ static int psb_mode_operation_ioctl(struct drm_device *dev, void *data, case PSB_MODE_OPERATION_MODE_VALID: umode = &arg->mode; - mutex_lock(&dev->mode_config.mutex); + drm_modeset_lock_all(dev); obj = drm_mode_object_find(dev, obj_id, DRM_MODE_OBJECT_CONNECTOR); @@ -525,7 +525,7 @@ static int psb_mode_operation_ioctl(struct drm_device *dev, void *data, if (mode) drm_mode_destroy(dev, mode); mode_op_out: - mutex_unlock(&dev->mode_config.mutex); + drm_modeset_unlock_all(dev); return ret; default: