Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4429667imu; Mon, 7 Jan 2019 23:26:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN5IxatYziD4shRSwXnufEIpkjjf16L+fNEgIXyRUG/WPuCIm84x5MM+GmvLwxDKnN5YG6gz X-Received: by 2002:a17:902:9897:: with SMTP id s23mr638814plp.69.1546932386120; Mon, 07 Jan 2019 23:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546932386; cv=none; d=google.com; s=arc-20160816; b=M8iJYO8m5sVuVrKR3O9ApjJTxvD+d28dfNthy6IBqGJqLeWd8F4FlLJa5FaJixacC+ q3bNjUY/ivXsbhWH7M4lfB+plqwHkaD1VisbSJD4TbZMI+sMK1hj0KoD8cOefj7mJu5e NxHTTW7moRKhERce1Hca/pzN3LytBeGL+YcU/PmHtn39MoEIVXgLGI5fCbVx1HMUgHtl XPQpV7nOqpw1S6jOpcqBIQnQdwQHV8k1ofqiGkOXSfc+z13qr1NrfHLdAt0/+EcIGuA1 N6jxAiZncIsXw3lb93q/yU9WoViFwctaM9NoEwpF7J8ksPYT8doaLYkHyIE79bwhUyNQ CO3A== 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=hgDGhfvXFmRibkMt/6N6NWlkENugEthtdl6iWMh04F0=; b=rc7cfwXckXn5iPvXrAUizJlSs8JfJEXyGAF5E/LQJNPIiI1SYdpZCDooQkkBunPF6F INe3lLEZ08PLSal6F/bXcQKaUVzXe5suwKGHPwCSuZdRtldkrzGpA200u9cppyFkGnK8 p1vnEoDTUP+mg4PeFIGMOtPZkg+iuFVueeXdl+FHrbXD+8crkVMknrhyKW/JGd1Fe9A3 aFhWZcPfJ8hCqcpoPNBhSbCdBNefBsjpETYF6piV0H2MqI5ar4MpPLwTLBuLEFx+Pa3n DGkaNhSjN7sud3kyes/9Nmdms3LYsu3ti0vGFVICkk8tPD4Rb0yJZ7ktJ8wxFxSr1V4e 2imw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kR85Gsa0; 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 s71si67347157pfk.105.2019.01.07.23.25.56; Mon, 07 Jan 2019 23:26:26 -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=kR85Gsa0; 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 S1727538AbfAHHY3 (ORCPT + 99 others); Tue, 8 Jan 2019 02:24:29 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:44883 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727295AbfAHHY3 (ORCPT ); Tue, 8 Jan 2019 02:24:29 -0500 Received: by mail-lj1-f194.google.com with SMTP id k19-v6so2494763lji.11 for ; Mon, 07 Jan 2019 23:24:27 -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=hgDGhfvXFmRibkMt/6N6NWlkENugEthtdl6iWMh04F0=; b=kR85Gsa0QOn+Ah/jCKzcPH3V51vtB6YDoNHiqp/ASaWBtKGAJw3vZotCZ0tMm23YFe OZbxgaVbIEPDDS9EPTUrjidqioCvcPI9jH0KCVWY4kCXPR/zOu5oAoF4i+mPHvWiAb0W 2BtGncwqDCknfTrMfGqSVnm9l7By7Uh3/Lm0/pTXudTi24waWuQ5k9tsO90HhFkVdlCX GQ5Ae7FfNpVu9NBvuZ/oGUoUzM5Any4CmI9/iNndPB9qfg0OsQOJmqijcSp0d5oQ/mph wZTi2tdpASB4CxlNfySKRKcXS4Tb6Za4XpYaMqCOug106tnnjUpAn2PByYffJSwDpY7v AGjA== 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=hgDGhfvXFmRibkMt/6N6NWlkENugEthtdl6iWMh04F0=; b=GXaeJJwzCgN3ofUC5gw8+fF3YaOBCht0PIQqq9/IMwDbzAGc8+76q3F35jo3QYGIJ/ lnB48bV08qeLFi011ISJiKTwTbSsUsMuTvbiDJ/kv8cO1V10GEVoBs6D/Okr2E8AcGV9 KZJkXYbgzHDNtvnS9nyvG+FoSKqjVRsRtHcp4A8URhUMsNh+PL2a7nNwEI44kvzaXQw/ dExxvT3ZOGppMAkcY7dFAN/DpK87OaDsyzGD94hIkjRoOxjpK+JujywcTUTyThlrIgkD M8hsAzRJiMIiGLKTwri8ssRfuwbMn5m1x+o4T0hY8jsXtz8z6YSuldJLTTQcTx6lCIXB XUZw== X-Gm-Message-State: AJcUukdIm2Sb0v/YZb/t2+8Ug6ZI4CjMFKqRBSN/r0lpOcQbzCKgXNRH f2rqaFgibOfcQBnxrxdY5z4= X-Received: by 2002:a2e:9b52:: with SMTP id o18-v6mr389811ljj.108.1546932266964; Mon, 07 Jan 2019 23:24:26 -0800 (PST) Received: from localhost.localdomain (pool-109-191-228-208.is74.ru. [109.191.228.208]) by smtp.gmail.com with ESMTPSA id t144sm12858447lff.53.2019.01.07.23.24.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jan 2019 23:24:26 -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: [PATCH v2 0/2] Fix SDL 1.2 on emulated fbdev devices (broken in kernels >=4.19) Date: Tue, 8 Jan 2019 12:23:51 +0500 Message-Id: <20190108072353.28078-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. 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-friendliness. First patch in this series fixes a clear regression. Second patch is optional, please read commit message carefully before applying it. Changes in v2: - Added "Cc: stable" to the second patch. - Proposed by Daniel Vetter: always use current depth (fb->format->depth) in a case of zero pixel format values and do not perform any guessing. Changes in v1: - Added "Cc: stable" to the patch which fixes known regression. - Added more information and detailed reproduction steps in commit messages. Changes in v0: - RFC patch series introduced. Ivan Mironov (2): drm/fb-helper: Partially 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 | 149 ++++++++++++++++++++------------ 1 file changed, 95 insertions(+), 54 deletions(-) -- 2.20.1