Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1476222pxx; Fri, 30 Oct 2020 10:50:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDh5mNmYagwzYuQ0zl35/Go2AJMwm+rdtJpAVjgmrbaGszC6qPwEbrAdMz4mrjjTNGFqVY X-Received: by 2002:aa7:c6cd:: with SMTP id b13mr3885079eds.32.1604080202973; Fri, 30 Oct 2020 10:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604080202; cv=none; d=google.com; s=arc-20160816; b=X3uC6MceU61aMdLsF1Z8RuEH/bbYIR1FYhfgsgKH/PMJVWKW7Ia/UlqPtPSyjnH9nY HdJUbkFfi6huJp1EhGQBcyJtvdqSjqUyq5Duk7Jxl7RAftnkKz1D94Z9vXt6bOq2zbFz H5QU0oumzUrqcYDgoNcapMAE21AQikskBr/PqviS8rGB75BBqPh7wqCMnPST1SxwBvcX AHcPTyILglXwNzWKuOdVHgDG3E4GL5Bal2sXHjnNAKzSHW+ZZW4d0rF/qBsIKxyLkNnM pPPg0zth3IiP8Mm6gkwmWB2gHc5tTy/vHUNnSDEwnG22ENSY7JE4aDsvvxbe2dM/qPc0 gFHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7wEr5Dqk9C4lrCpsWhhhfQP1Jc/kVZd8qfNomT6z69M=; b=gA0hWvm6z15qMmGLhOZOMknwDtJUvdEF+VGuyxX4AcK2PhOklLrfmFqclFBDPkddqH PXqlcfBPKmXsnDnPhVXVZYXMoI7Lo7ILCeyfa5OFscRPstT6IuoE5cyjYzy3M8SolcfP 2BFfNkSujERYXpoPQFZc0PeRQpeXZnDtCmUi8Cic9uaX/J7QcclXx02n+8TIrPU1hz2f W9svw6GiNkmqvuKbFheBJs6DDlS2JMI8INo77r0qwETN0ge/RpOe+A1COFVghfs+Nhiq GQ6lRd5DPhXGFC6YbnQPCHd7Tth74nmTf5LifKL6ob9srwZQtoTtQ7drLQSVDIgouFPp ncNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8d3YMIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si5744303ejj.595.2020.10.30.10.49.39; Fri, 30 Oct 2020 10:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8d3YMIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727120AbgJ3Rpg (ORCPT + 99 others); Fri, 30 Oct 2020 13:45:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbgJ3Rpf (ORCPT ); Fri, 30 Oct 2020 13:45:35 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC8EBC0613CF for ; Fri, 30 Oct 2020 10:45:35 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id c16so3704736wmd.2 for ; Fri, 30 Oct 2020 10:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7wEr5Dqk9C4lrCpsWhhhfQP1Jc/kVZd8qfNomT6z69M=; b=T8d3YMICnoOKnXtEbbghVhWKZ3yII6mafp3clEg+DIdgIUQRAwj4kzKL0tre+6nw/f P4jUgaU8fsaBbltL+Q1ci2XXkWPGsakMLHbbjwrKwN4Zh7ViAtGUNvSzKywMXWLIzjuq mVxIB8NwhsFaBbBYf/LxfcTQ1ivXoeuRdeegUICZiUkmqGgqqTg5RK0ZZ6MKdI5PnVPc YrhEGoTLkCdH9GIdbVHzGXfOpZ4Qm7qwgstPrVdNzr5BazWxSEBdlUmH7WzzoQymseiP 5MgRBnCWszu7096iYogx0VoVjRsGXZKE/HctieslL/ekoB3W8FZ2dXqAmUQkkhLcJsgU YZqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7wEr5Dqk9C4lrCpsWhhhfQP1Jc/kVZd8qfNomT6z69M=; b=kEqYjfs+NdOZIfpnCe3+1s6oyRdL5htuHr0wUWtgkkbuaWSi6WZxNFq4Ep/z3Y3yEC yHmd58zNVoaZ1bdzzlsXs/Tru0vf1d1hdvlfANYwDISyAz7nsfORZDIhwtbXn7awaieT HnYS/mf6A9/svCvgrkTz1FAH/2T2xRwlj1v/9lHjfJ4XyUNbAtsVqDtAfy4afEJVsOXP W/PEmRrvWbsMRVRQuPqk1i+ejgBRhP3BsQNOHHISBRGlnVu0UcPBnt8Wummz27n7sxUz yzoVOuOVpaL3AHm7F4W6CVGBU09iuOBeImDzsMw0WXt9NbTJnRfbpec/UfxcD6Nw/K8S BYcQ== X-Gm-Message-State: AOAM530Cw10TmWataWdyVKN8bZtHAM2fMEZH99Rk/LKMUA/jo5g394gy 1SjULt+xBgHjC6wbgxW0QeKfU6KNZu78ZAQ51OM= X-Received: by 2002:a1c:6302:: with SMTP id x2mr4030775wmb.56.1604079934351; Fri, 30 Oct 2020 10:45:34 -0700 (PDT) MIME-Version: 1.0 References: <20201026210039.3884312-1-arnd@kernel.org> <20201026210039.3884312-4-arnd@kernel.org> In-Reply-To: From: Alex Deucher Date: Fri, 30 Oct 2020 13:45:22 -0400 Message-ID: Subject: Re: [PATCH 4/5] drm/amdgpu: fix build_coefficients() argument To: Harry Wentland Cc: Arnd Bergmann , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Anthony Koo , Krunoslav Kovac , Lewis Huang , Aric Cyr , Arnd Bergmann , Maling list - DRI developers , LKML , Denis Efremov , Reza Amini , amd-gfx list , Josip Pavic , Nicholas Kazlauskas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Fri, Oct 30, 2020 at 1:04 PM Harry Wentland wro= te: > > > > On 2020-10-29 11:53 p.m., Alex Deucher wrote: > > On Mon, Oct 26, 2020 at 5:01 PM Arnd Bergmann wrote: > >> > >> From: Arnd Bergmann > >> > >> gcc -Wextra warns about a function taking an enum argument > >> being called with a bool: > >> > >> drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In = function 'apply_degamma_for_user_regamma': > >> drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1617= :29: warning: implicit conversion from 'enum ' to 'enum dc_trans= fer_func_predefined' [-Wenum-conversion] > >> 1617 | build_coefficients(&coeff, true); > >> > >> It appears that a patch was added using the old calling conventions > >> after the type was changed, and the value should actually be 0 > >> (TRANSFER_FUNCTION_SRGB) here instead of 1 (true). > > > > This looks correct to me. Harry, Leo? > > > > Confirmed with Kruno, this is correct. > > Reviewed-by: Harry Wentland > > Harry > > > Alex > > > > > >> > >> Fixes: 55a01d4023ce ("drm/amd/display: Add user_regamma to color modul= e") > >> Signed-off-by: Arnd Bergmann > >> --- > >> drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b= /drivers/gpu/drm/amd/display/modules/color/color_gamma.c > >> index b8695660b480..09bc2c249e1a 100644 > >> --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c > >> +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c > >> @@ -1614,7 +1614,7 @@ static void apply_degamma_for_user_regamma(struc= t pwl_float_data_ex *rgb_regamma > >> struct pwl_float_data_ex *rgb =3D rgb_regamma; > >> const struct hw_x_point *coord_x =3D coordinates_x; > >> > >> - build_coefficients(&coeff, true); > >> + build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB); > >> > >> i =3D 0; > >> while (i !=3D hw_points_num + 1) { > >> -- > >> 2.27.0 > >> > >> _______________________________________________ > >> amd-gfx mailing list > >> amd-gfx@lists.freedesktop.org > >> https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fli= sts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=3D04%7C01%7Char= ry.wentland%40amd.com%7C3b50cfb318a04e2708e308d87c875c07%7C3dd8961fe4884e60= 8e11a82d994e183d%7C0%7C0%7C637396268091128887%7CUnknown%7CTWFpbGZsb3d8eyJWI= joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sd= ata=3DQGijLrlFTXI3xx2sGx1iNczHBezfWdu%2FP2xkfoq%2FMB0%3D&reserved=3D0