Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5535836imu; Wed, 26 Dec 2018 04:51:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5j5TewTc3LZD1BfulcnAFYMQxJrmV2Gef6yWOUp4ebQnyCAcWS70DLl6kPzrD8mjpPt1Is X-Received: by 2002:a63:fb4c:: with SMTP id w12mr18990959pgj.321.1545828711541; Wed, 26 Dec 2018 04:51:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545828711; cv=none; d=google.com; s=arc-20160816; b=o/vYcU7xF/dpra8uKJ8Px1J6d+4fuAwylAZhVkckaf8dtI9BWYYp0D4f/mmZ2Rzz06 fjiLtbaWe90lOZxXUpjgLbN4uUxwHT9vr9JWg2gM/h8OKueB2fD9Hizsonzhx0v9UQwF eckBbDDDUYSHvx7xUW++4x7mS8vXtLa3YBt8+48tOFSFr3rFQi5ubLycJOssk7fMbOkp kajrjOpePRTPN5HdxpTYzP5ZgnGhE1+aOZlT8+X23tEBhKF4UhLoJtxgcwSCc2cF2PI1 paz/iTJWoiOrIhK1FujtKsHqEJsfHMTYwipmXmCk41k73yn/Ld6LTiKOUElIxuqFE6ef gCOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=yjMTMhJ41Jz5DlBO6zfblje/wD77JI0VsFIRBsesqY0=; b=S7koKhrOU07JNiji2rVesseWM4sFkIOBFg9+dxIqYKcWnot7GEEP4krVNt6ye++R7B vrWK9cOxD0MSkG9NCvXWM/FEF2+FgrXvj3DRKcoqHxmnJCN4FCHj4ktSeF1eStDUGTHc SrhP5itVzat/S569K3aM3PHCOwvKXmmygJLUezP5R3RmW4zkw6pt1fhU4wkBq+54K+UQ 3IYj62qE8syo3krF4B7rfNvaDoVw9YC9eWVEEnrb/2VUJmHs612i2MGgEts85Y7kAS/b AeAHBjodbiajlKVQqoECpyAsNaIcoL3fGaGvGXUYRhkxceD9oSwd1xchU/p/xDzZkL/n 3ewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qEwmGe0l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id e126si16900021pfh.185.2018.12.26.04.51.05; Wed, 26 Dec 2018 04:51:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qEwmGe0l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726728AbeLZMLi (ORCPT + 99 others); Wed, 26 Dec 2018 07:11:38 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44463 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbeLZMLi (ORCPT ); Wed, 26 Dec 2018 07:11:38 -0500 Received: by mail-lf1-f68.google.com with SMTP id z13so10732229lfe.11 for ; Wed, 26 Dec 2018 04:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yjMTMhJ41Jz5DlBO6zfblje/wD77JI0VsFIRBsesqY0=; b=qEwmGe0ldYzazj7gyCeG9546HbvVLqxrYdNcN7JoimFMrCxKwVEkpM1uVfnvJ/EDUr gFqjwoc7hCClygXkjI9QQpsDvCGwGKVPIVQ47+A62Slb+oWmyjuaxI94CpJgU542Bipt 0LfbOJaNJFqPxDlynlu8bmlu6Ci3RmFgrXh0T9i3mkpQUeLJLCYPaggl+3R7phNeIfxL Q9J3KuySMLQPBkvHk5G0LWbMqA1tvJLmVSPoe74JU30ZX0mXOMaTNhBrnwCzn77rvtNu g9cWmgLU/eUNeHoqtzyHGv9i55Uzpwpdmc5EV9yYgSmmViX29OygTSNTGmH2yj/GQEqX IFEA== 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=yjMTMhJ41Jz5DlBO6zfblje/wD77JI0VsFIRBsesqY0=; b=T3q6ebrCGuoC0FE5kSmotbmGZ1Lcq9DAX/YE+SCu5+bGfffEq01CGYZ8fT17cGs5E9 SO4A80ARSyOVwcz9825610sRmRwDGo7it9H+kQEf7ohTwaQCDcTxw8+/HKt0hR26ghA6 PsSZoNwgNNpFmhJTiYxdec8N4p1fx1CKMxxTWPVniDVa+tDoMp5LzbVRPFHyqO0rnRUB KR4CuuZ6+REgTJ1XDxlHiN9woB7JQiOAvL66vGsPCgFqogFJdDEkX8c5EJHl31opmkx0 tK8LQnudSPwlvoURhX+k551Y/7Rh609Os0bu2I4XYZ5SnzppH/gs0mZUsOWz14X+taqB uCcw== X-Gm-Message-State: AA+aEWbAcHK/P0zweTpF4dMwmVwAQw5bA2r9+RvPAnQDZvslFL+HJRpl WrQ5EkOBqeQH2XANHEbF4yLrm+dYC69R/Q== X-Received: by 2002:a19:c203:: with SMTP id l3mr9494987lfc.113.1545826296430; Wed, 26 Dec 2018 04:11:36 -0800 (PST) Received: from localhost.localdomain (pool-109-191-228-208.is74.ru. [109.191.228.208]) by smtp.gmail.com with ESMTPSA id q6sm7037684lfh.52.2018.12.26.04.11.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Dec 2018 04:11:35 -0800 (PST) From: Ivan Mironov To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , saahriktu , Eugeniy Paltsev , Ivan Mironov Subject: [RFC PATCH 0/2] Fix SDL 1.2 on emulated fbdev devices (broken in kernels >=4.19) Date: Wed, 26 Dec 2018 17:11:22 +0500 Message-Id: <20181226121124.1632-1-mironov.ivan@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Originally this issue was brought up on linux.org.ru forum by user saahriktu, he is on Cc. He discovered that commit db05c48197759 ("drm: fb-helper: Reject all pixel format changing requests") breaks support of SDL1 programs, like various old games and emulators of old game consoles. First patch contains fix for that commit. I tried to reproduce the same issue in a VM under qemu, and found yet another part of kernel code which prevents SDL1 apps from running normally. Second patch in this series fixes this problem. However, I still have few unresolved questions regarding this patches: * Why simple revert of commit db05c48197759 fixes SDL1 support for saahriktu? I do not understand how this could work when SDL1 has hardcoded non-zero pixclock values, for which current code always returns EINVAL. * How this worked before? How this is working for non-DRM fbdev drivers? fbdev support code in SDL1 is also very old by the way. Also, it seems that at least in some cases both problems could be circumvented by adding appropriate modes into /etc/fb.modes. But without examining the kernel code it is not clear which values are correct. I am not sure that such circumvention covers all possible cases, and it is definitely far from any user-frienliness. Ah, almost forgot this: the easiest way to reproduce both problems is to install sdl-sopwith[1] and try to run it from console without X. At least in Fedora 29, sopwith may be simply installed from standard repositories. [1] http://sdl-sopwith.sourceforge.net/ Ivan Mironov (2): drm/fb-helper: Bring back workaround for bugs of SDL 1.2 drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock drivers/gpu/drm/drm_fb_helper.c | 153 +++++++++++++++++++++----------- 1 file changed, 99 insertions(+), 54 deletions(-) -- 2.20.1